CodePal
A full-featured devtools toolkit for checking, validating, generating, formatting, linting, explaining, converting, diffing, previewing, and fixing code — with built-in logging, search, statistics, and data export.
Commands
| Command |
Description |
check <input> |
Check code and log the result; without args shows recent check entries |
validate <input> |
Validate code input; without args shows recent validate entries |
generate <input> |
Generate code from a description; without args shows recent entries |
format <input> |
Format code; without args shows recent format entries |
lint <input> |
Lint code for potential issues; without args shows recent lint entries |
explain <input> |
Explain a code snippet or concept; without args shows recent entries |
convert <input> |
Convert code between languages or formats; without args shows recent entries |
template <input> |
Create or apply code templates; without args shows recent entries |
diff <input> |
Log code differences; without args shows recent diff entries |
preview <input> |
Preview code output; without args shows recent preview entries |
fix <input> |
Record a code fix; without args shows recent fix entries |
report <input> |
Generate a code report; without args shows recent report entries |
stats |
Show summary statistics across all log categories |
export <fmt> |
Export all data (json, csv, or txt) |
search <term> |
Search across all logged entries for a keyword |
recent |
Show the 20 most recent entries from the activity log |
status |
Health check — version, data dir, total entries, disk usage, last activity |
help |
Show all available commands |
version |
Print version (v2.0.0) |
Usage
codepal <command> [args]
Each command with arguments logs the input with a timestamp to a category-specific log file. Running a command with no arguments shows the most recent entries for that category.
Data Storage
- Default location:
~/.local/share/codepal
- Log files: Each command has its own log file (e.g.,
check.log, lint.log, generate.log)
- History: All actions are also recorded in
history.log with timestamps
- Export formats: JSON (structured array of objects), CSV (type/time/value columns), plain text (grouped by category)
Requirements
- Bash 4+ (strict mode:
set -euo pipefail)
- No external dependencies or API keys required
- Standard Unix tools (
date, wc, grep, du, head, tail)
When to Use
- Code review tracking — Use
check, lint, and validate to log issues discovered during code review sessions, then search to find them later
- Learning unfamiliar codebases — Use
explain to document your understanding of code patterns, then report to create summaries
- Code generation and templating — Use
generate to log code generation prompts and template to track template usage
- Diffing and debugging — Use
diff to record code changes and fix to document bug fixes, creating an audit trail
- Team metrics and reporting — Use
stats for activity summaries, export json to feed into dashboards, and recent for quick status checks
Examples
# Check a function
codepal check "validateEmail() is missing null check"
# Generate a code snippet description
codepal generate "React hook for debounced search"
# Lint a file
codepal lint "server.js:42 — unused variable 'config'"
# Explain a concept
codepal explain "JavaScript closure in event handler"
# Record a diff
codepal diff "Refactored auth middleware to use async/await"
# Fix a bug
codepal fix "Off-by-one error in pagination logic"
# View aggregate statistics
codepal stats
# Export all logged data as CSV
codepal export csv
# Search for entries about authentication
codepal search "auth"
# Show recent activity
codepal recent
# Health check
codepal status
Output
- Command results print to stdout
- Entries are timestamped (
YYYY-MM-DD HH:MM) and persisted to ~/.local/share/codepal/<category>.log
- Export files are written to
~/.local/share/codepal/export.<fmt> with a byte count confirmation
Powered by BytesAgain | bytesagain.com | hello@bytesagain.com
1---
2name: codepal
3description: "Analyze codebases quickly with AI-powered intelligence and insights. Use when understanding unfamiliar repos, checking quality, or generating summaries."
4version: "2.0.0"
5author: "BytesAgain"
6homepage: https://bytesagain.com
7source: https://github.com/bytesagain/ai-skills
8tags: ["code","developer","analysis","todo","loc","dependencies","programming","devtools"]
9categories: ["Developer Tools", "Productivity"]
10metadata:
11 source: https://skillmd.com/skills/bytesagain/codepal
12---
13
14# CodePal
15
16A full-featured devtools toolkit for checking, validating, generating, formatting, linting, explaining, converting, diffing, previewing, and fixing code — with built-in logging, search, statistics, and data export.
17
18## Commands
19
20| Command | Description |
21|---------|-------------|
22| `check <input>` | Check code and log the result; without args shows recent check entries |
23| `validate <input>` | Validate code input; without args shows recent validate entries |
24| `generate <input>` | Generate code from a description; without args shows recent entries |
25| `format <input>` | Format code; without args shows recent format entries |
26| `lint <input>` | Lint code for potential issues; without args shows recent lint entries |
27| `explain <input>` | Explain a code snippet or concept; without args shows recent entries |
28| `convert <input>` | Convert code between languages or formats; without args shows recent entries |
29| `template <input>` | Create or apply code templates; without args shows recent entries |
30| `diff <input>` | Log code differences; without args shows recent diff entries |
31| `preview <input>` | Preview code output; without args shows recent preview entries |
32| `fix <input>` | Record a code fix; without args shows recent fix entries |
33| `report <input>` | Generate a code report; without args shows recent report entries |
34| `stats` | Show summary statistics across all log categories |
35| `export <fmt>` | Export all data (json, csv, or txt) |
36| `search <term>` | Search across all logged entries for a keyword |
37| `recent` | Show the 20 most recent entries from the activity log |
38| `status` | Health check — version, data dir, total entries, disk usage, last activity |
39| `help` | Show all available commands |
40| `version` | Print version (v2.0.0) |
41
42## Usage
43
44```bash
45codepal <command> [args]
46```
47
48Each command with arguments logs the input with a timestamp to a category-specific log file. Running a command with no arguments shows the most recent entries for that category.
49
50## Data Storage
51
52- **Default location**: `~/.local/share/codepal`
53- **Log files**: Each command has its own log file (e.g., `check.log`, `lint.log`, `generate.log`)
54- **History**: All actions are also recorded in `history.log` with timestamps
55- **Export formats**: JSON (structured array of objects), CSV (type/time/value columns), plain text (grouped by category)
56
57## Requirements
58
59- Bash 4+ (strict mode: `set -euo pipefail`)
60- No external dependencies or API keys required
61- Standard Unix tools (`date`, `wc`, `grep`, `du`, `head`, `tail`)
62
63## When to Use
64
651. **Code review tracking** — Use `check`, `lint`, and `validate` to log issues discovered during code review sessions, then `search` to find them later
662. **Learning unfamiliar codebases** — Use `explain` to document your understanding of code patterns, then `report` to create summaries
673. **Code generation and templating** — Use `generate` to log code generation prompts and `template` to track template usage
684. **Diffing and debugging** — Use `diff` to record code changes and `fix` to document bug fixes, creating an audit trail
695. **Team metrics and reporting** — Use `stats` for activity summaries, `export json` to feed into dashboards, and `recent` for quick status checks
70
71## Examples
72
73```bash
74# Check a function
75codepal check "validateEmail() is missing null check"
76
77# Generate a code snippet description
78codepal generate "React hook for debounced search"
79
80# Lint a file
81codepal lint "server.js:42 — unused variable 'config'"
82
83# Explain a concept
84codepal explain "JavaScript closure in event handler"
85
86# Record a diff
87codepal diff "Refactored auth middleware to use async/await"
88
89# Fix a bug
90codepal fix "Off-by-one error in pagination logic"
91
92# View aggregate statistics
93codepal stats
94
95# Export all logged data as CSV
96codepal export csv
97
98# Search for entries about authentication
99codepal search "auth"
100
101# Show recent activity
102codepal recent
103
104# Health check
105codepal status
106```
107
108## Output
109
110- Command results print to stdout
111- Entries are timestamped (`YYYY-MM-DD HH:MM`) and persisted to `~/.local/share/codepal/<category>.log`
112- Export files are written to `~/.local/share/codepal/export.<fmt>` with a byte count confirmation
113
114---
115
116Powered by BytesAgain | bytesagain.com | hello@bytesagain.com