Cleanup Workspace
Use this guide to run aigne web clear safely, whether you want to wipe generated pages, reset cached data, or remove authorization tokens before handing off a project.
The clear command is a utility for managing your project's workspace (typically the ./.websmith/tmp directory). It allows you to selectively remove generated files, cached data, and configuration settings. This is particularly useful when you want to start a fresh build, reset your configuration, or remove sensitive authorization data.
Executing the command can be a destructive action. Please ensure you have backed up any important data before proceeding.
Interactive Clearing#
The simplest way to use the command is to run it without any arguments. This will launch an interactive prompt where you can select the specific items you wish to clear.
Cleanup Workspace
aigne web clearThis will present a list of available items to remove. You can navigate with the arrow keys, select items with the spacebar, and confirm your selection by pressing Enter.
Clearable Targets#
The following table details the specific items that can be cleared, what they contain, and the command to clear them directly.
Target Name | Command Flag | Description |
|---|---|---|
Website Structure |
| Removes the website structure file ( |
Generated Pages |
| Deletes all generated page content from the workspace. This leaves the website structure file intact. |
Website Configuration |
| Deletes the main |
Authorizations |
| Deletes the |
Deployment Config |
| Removes only the |
Media File Descriptions |
| Deletes the cached, AI-generated descriptions for your media assets. These will be automatically regenerated on the next run of the |
Translation Caches |
| Deletes the AI-generated translation caches. These will be regenerated automatically on the next publish. |
Non-Interactive Clearing#
To bypass the interactive prompt, you can use the --targets flag followed by one or more target names. This is useful for scripting or automating cleanup tasks.
Clearing a Single Target#
To clear a single item, specify its name with the --targets flag.
Clear Website Structure
aigne web clear --targets websiteStructureClearing Multiple Targets#
You can provide a space-separated list of targets to clear multiple items at once. The following example clears both the website structure and the generated pages.
Clear --targets Websitestructure Generatedpages
aigne web clear --targets websiteStructure generatedPagesSummary#
The clear command provides a safe and controlled way to manage your project's generated assets and configuration. Use the interactive mode for guided cleanup or the --targets flag for direct, automated control. Always exercise caution, especially when clearing the websiteConfig, to avoid unintended data loss.
After clearing your workspace or generated pages, you may want to create the website again. For more details, see Create Website.