Stash Commands

Stash Commands

The Camber CLI provides several commands to manage your files in Camber Stash. This page covers the most common stash operations: listing, copying, and removing files.

Listing Files and Directories

Use the camber stash ls command to list files and directories in your stash:

camber stash ls stash://your-username/path

Output:

Listing files from stash://your-username/demos

Name                                     Type                 Size
----------------------------------------------------------------------
.git                                     directory
10-get-started                           directory
20-tutorials                             directory
30-applications                          directory
.gitignore                               file                 46B
README.md                                file                 118B

You can also list files in team stashes by using the team name instead of your username:

camber stash ls stash://team-name/path

Removing Files and Directories

To remove files or directories from your stash, use the camber stash rm command:

camber stash rm stash://your-username/path

Examples

Remove a directory:

camber stash rm stash://your-username/demos

This command works with both individual files and entire directories, for your stash or team stash. When removing directories, all contents will be deleted.

⚠️
Removing files and directories is permanent and cannot be undone. Use this command with caution.

Copying Files and Directories

The camber stash cp command allows you to copy files and directories within your stash or between stashes:

camber stash cp stash://your-username/source-path stash://your-username/destination-path

This command works with both files and directories.

Examples

Copy a file to a new location:

camber stash cp stash://your-username/demos/README.md stash://your-username/backup/README.md

Copy a directory and all its contents:

camber stash cp stash://your-username/demos/10-get-started/ stash://your-username/archive/10-get-started/

Copy between team stashes:

camber stash cp stash://your-username/project/ stash://team-name/shared-project/