Overview
Theworkspace command initializes pre-configured development workspace templates. It downloads template files from the Ahh CDN, caches them locally, and copies them to your desired location.
Syntax
Parameters
The name of the workspace template to initialize. Must be one of the available workspace choices.Available workspaces:
python-pwntools-interact- Python workspace with pwntools for CTF challengesweb-xss-template- Web security testing template for XSS vulnerabilities
Custom path where the workspace should be initialized. If not specified, creates a directory with the workspace name in the current directory.Aliases:
-pUsage Examples
Output
The command displays:- A spinner: “Initializing workspace…”
- Success message: “Workspace initialized.”
Example Output
How It Works
Workspace Caching
-
First Time: Downloads the workspace template from the CDN
- Downloads to
~/.ahh/workspaces/cache/<workspace-name>/ - Extracts the tarball
- Copies files to target location
- Downloads to
-
Subsequent Uses: Uses cached version
- Skips download if cache exists
- Directly copies from cache to target location
- Much faster initialization
Directory Structure
Available Workspaces
python-pwntools-interact
A Python workspace pre-configured for CTF binary exploitation challenges. Includes:- pwntools library setup
- Interactive exploit templates
- Common CTF utilities
- Binary exploitation challenges
- Reverse engineering tasks
- CTF competitions
web-xss-template
A web security testing template focused on XSS vulnerability testing. Includes:- XSS payload templates
- Testing utilities
- Example vulnerable pages
- Web security assessments
- XSS vulnerability research
- Security training
Technical Details
Download Process
Workspaces are downloaded from:- Creates cache directory if needed
- Uses
curlto download the tarball - Pipes directly to
tarfor extraction - Stores in
~/.ahh/workspaces/cache/<workspace-name>/
File Operations
Download Command
Copy Command
Error Handling
Invalid Workspace Name
If you provide an invalid workspace name:python-pwntools-interactweb-xss-template
Download Failures
If the download fails (network issues, invalid URL), the command will error during thecurl operation.
Directory Already Exists
The command creates the target directory withmkdir -p, which:
- Creates parent directories if needed
- Succeeds if directory already exists
- May overwrite files if they already exist in the target
Cache Management
Viewing Cache
Check your cached workspaces:Clearing Cache
To force re-download of a workspace:Notes
Workspaces are cached locally after the first download, making subsequent initializations much faster.
The workspace templates are maintained by the Ahh team and updated periodically. Clear your cache to get the latest version.
Related Commands
- update - Update the Ahh CLI to the latest version
