173 lines
4.5 KiB
Markdown
173 lines
4.5 KiB
Markdown
# pwcli Help Documentation
|
|
|
|
**pwcli** is a CLI for Photowall platform that provides commands for deployment, AWS operations, workflow automation, and more.
|
|
|
|
## Usage
|
|
|
|
Run `pwcli` to start the interactive menu, or use command shortcuts directly:
|
|
|
|
```bash
|
|
pwcli [command] [subcommand] [action]
|
|
```
|
|
|
|
### Command Shortcuts
|
|
|
|
Commands can be executed using their aliases. For example:
|
|
- `pwcli d ts s` → deployment testservers status
|
|
- `pwcli a ps l` → aws parameterstore list
|
|
- `pwcli wf g cb` → workflow git clean_old_branches
|
|
|
|
---
|
|
|
|
## Available Commands
|
|
|
|
### 🤖 **ai** (alias: `ai`)
|
|
AI-related commands
|
|
|
|
#### Subcommands:
|
|
- **promptcontextlibrary** (alias: `pcl`) - Copy context files to clipboard for AI prompts
|
|
|
|
**Example:** `pwcli ai pcl`
|
|
|
|
---
|
|
|
|
### ☁️ **aws** (alias: `a`)
|
|
AWS operations and management
|
|
|
|
#### Subcommands:
|
|
|
|
##### **ecs** (alias: `e`) - Working with ECS on AWS
|
|
- **sshtestserver** (alias: `sts`) - SSH into a test server in ECS
|
|
|
|
**Example:** `pwcli a e sts`
|
|
|
|
##### **logs** (alias: `l`) - Tail a log in CloudWatch (WIP)
|
|
|
|
**Example:** `pwcli a l`
|
|
|
|
##### **parameterstore** (alias: `ps`) - Working with parameter store on AWS
|
|
- **bulk-create** (alias: `bc`) - Bulk create parameters from JSON file
|
|
- **create** (alias: `c`) - Create a new item in parameter store
|
|
- **list** (alias: `l`) - List all parameters in parameter store
|
|
- **update** (alias: `u`) - Update an existing item in parameter store
|
|
|
|
**Examples:**
|
|
- `pwcli a ps l` - List parameters
|
|
- `pwcli a ps c` - Create parameter
|
|
- `pwcli a ps bc` - Bulk create from JSON file
|
|
|
|
##### **pipeline** (alias: `pl`) - Pipeline operations
|
|
- **status** (alias: `s`) - View pipeline status with live tracking
|
|
|
|
**Example:** `pwcli a pl s`
|
|
|
|
##### **s3** (alias: `s3`) - Working with S3 on AWS
|
|
- **clear_prints** (alias: `cp`) - Clear prints-dev bucket on S3
|
|
- **print_on_station** (alias: `pos`) - Print on a real station (copies from dev to production)
|
|
- **sync_images** (alias: `si`) - Sync images between S3 buckets
|
|
|
|
**Examples:**
|
|
- `pwcli a s3 si` - Sync images
|
|
- `pwcli a s3 cp` - Clear prints
|
|
|
|
---
|
|
|
|
### 🚀 **deployment** (alias: `d`)
|
|
Deployment and test server management
|
|
|
|
#### Subcommands:
|
|
|
|
##### **testservers** (alias: `ts`) - Deploy to testservers
|
|
- **create** (alias: `c`) - Create new testserver on AWS
|
|
- **delete** (alias: `d`) - Choose a testserver to delete
|
|
- **status** (alias: `s`) - Show status for available testservers
|
|
- **update** (alias: `u`) - Update stack with different branch
|
|
|
|
**Examples:**
|
|
- `pwcli d ts s` - View testserver status
|
|
- `pwcli d ts c` - Create new testserver
|
|
- `pwcli d ts u` - Update existing testserver
|
|
|
|
---
|
|
|
|
### 📧 **mandrill** (alias: `m`)
|
|
Mandrill/Mailchimp email template operations
|
|
|
|
#### Subcommands:
|
|
- **fix_template** (alias: `ft`) - Remove incorrect artifacts caused by Mailchimp export to Mandrill
|
|
|
|
**Example:** `pwcli m ft`
|
|
|
|
---
|
|
|
|
### ⚙️ **setup** (alias: `s`)
|
|
Setup pwcli configuration
|
|
|
|
#### Subcommands:
|
|
- **settings** (alias: `se`) - Setup settings for pwcli (GitHub token, repo paths, API keys, etc.)
|
|
|
|
**Example:** `pwcli setup settings` or `pwcli s se`
|
|
|
|
---
|
|
|
|
### 🧪 **test** (alias: `t`)
|
|
Test commands
|
|
|
|
#### Subcommands:
|
|
- **routes** (alias: `r`) - Test pre-configured routes for 200 status on configured localhost
|
|
|
|
**Example:** `pwcli t r`
|
|
|
|
---
|
|
|
|
### 🔄 **update** (alias: `up`)
|
|
Update pwcli to the latest version from main branch and rebuild
|
|
|
|
**Example:** `pwcli update` or `pwcli up`
|
|
|
|
---
|
|
|
|
### 🔧 **workflow** (alias: `wf`)
|
|
Workflow tools for development
|
|
|
|
#### Subcommands:
|
|
|
|
##### **git** (alias: `g`) - Tools for git to make repo life easier
|
|
- **clean_local_branches** (alias: `clb`) - Clean local branches without origin connection
|
|
- **clean_old_branches** (alias: `cb`) - Prune remote and clean local branches if gone
|
|
|
|
**Examples:**
|
|
- `pwcli wf g cb` - Clean old branches
|
|
- `pwcli wf g clb` - Clean local branches
|
|
|
|
##### **setupissue** (alias: `si`) - Setup everything for an issue
|
|
Creates a new branch from origin/master based on a GitHub issue
|
|
|
|
**Example:** `pwcli wf si`
|
|
|
|
---
|
|
|
|
## Configuration
|
|
|
|
Run `pwcli setup settings` to configure:
|
|
- GitHub access token
|
|
- Local photowall repository path
|
|
- Mandrill API key
|
|
- Localhost URL and credentials for testing
|
|
|
|
Settings are stored in `~/.pwcli_settings`
|
|
|
|
---
|
|
|
|
## Tips
|
|
|
|
- Use the interactive menu by running `pwcli` without arguments
|
|
- Chain command aliases for faster execution: `pwcli d ts s`
|
|
- Most commands require AWS CLI to be installed and configured
|
|
- Some commands require settings to be configured first (run `pwcli setup settings`)
|
|
|
|
---
|
|
|
|
For more information, visit the repository or run commands interactively with `pwcli`
|
|
|