Skip to content

Commit 7c08280

Browse files
committed
chore(release): publish v0.1.0 and enhance demo
Signed-off-by: flurry101 <sravya.sm1491@gmail.com>
1 parent 10e65ad commit 7c08280

6 files changed

Lines changed: 242 additions & 34 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
__pycache__/
33
*.py[cod]
44
*$py.class
5+
*.pypirc
56
*.so
67
.Python
78
build/

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [0.1.0] - 2025-01-04
99

10+
### Published
11+
12+
https://test.pypi.org/project/devkit-cli/0.1.0/
13+
https://pypi.org/project/devkit-cli/0.1.0/
14+
15+
## [0.1.0] - 2025-01-04
16+
1017
### Added
1118
- **Snippet Tags System**: Add tags to snippets for better organization
1219
- **Snippet Search**: Search snippets by name, command content, or tags
@@ -20,7 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2027
- **Storage Format**: Upgraded snippet storage to support metadata (backward compatible)
2128
- **Snippet Commands**: Enhanced all snippet commands to work with new format
2229
- **Project Structure**: Cleaned up directory structure, improved .gitignore
23-
- **Version**: Bumped to 0.2.0 for feature release
30+
- **Version**: Bumped to 0.1.0 for feature release
2431

2532
### Fixed
2633
- **Code Redundancy**: Removed duplicate snippet commands in main.py

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ Get started in seconds. All you need is Python 3.8+.
3838
pip install devkit-cli
3939
````
4040

41+
Sources:
42+
- https://pypi.org/project/devkit-cli/0.1.0/
43+
- https://test.pypi.org/project/devkit-cli/0.1.0/
44+
45+
4146
### 2. Configure Your AI *(Optional, but Recommended)*
4247

4348
To unlock the AI features, you need a free Google AI API key.

demo/examples.sh

Lines changed: 153 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,164 @@
11
#!/bin/bash
2-
# DevKit Examples Script
3-
# Load common snippets to get started with DevKit
2+
# Complete DevKit Demo - All Features Showcase
3+
# Run this to demonstrate all capabilities
44

5-
echo "🚀 Loading DevKit example snippets..."
5+
set -e # Exit on error
66

7-
# System monitoring snippets
8-
python3 -m devkit.main snippet save ports "lsof -i -P -n | grep LISTEN"
9-
python3 -m devkit.main snippet save size "du -sh * | sort -h"
10-
python3 -m devkit.main snippet save find-large "find . -type f -size +100M"
7+
echo "=========================================="
8+
echo "DevKit Complete Demo"
9+
echo "=========================================="
10+
echo ""
1111

12-
# Git snippets
13-
python3 -m devkit.main snippet save git-undo "git reset --soft HEAD~1"
14-
python3 -m devkit.main snippet save git-clean "git clean -fd && git reset --hard HEAD"
15-
python3 -m devkit.main snippet save git-log "git log --oneline -10"
12+
# Colors for output
13+
GREEN='\033[0;32m'
14+
CYAN='\033[0;36m'
15+
YELLOW='\033[1;33m'
16+
NC='\033[0m' # No Color
1617

17-
# Docker snippets
18-
python3 -m devkit.main snippet save docker-clean "docker system prune -af"
19-
python3 -m devkit.main snippet save docker-ps "docker ps -a"
20-
python3 -m devkit.main snippet save docker-logs "docker logs -f"
18+
demo_step() {
19+
echo -e "${CYAN}$1${NC}"
20+
sleep 1
21+
}
2122

22-
# Development snippets
23-
python3 -m devkit.main snippet save npm-audit "npm audit fix"
24-
python3 -m devkit.main snippet save pip-update "pip list --outdated"
25-
python3 -m devkit.main snippet save disk-usage "df -h"
23+
demo_command() {
24+
echo -e "${YELLOW} $ $1${NC}"
25+
eval "$1"
26+
echo ""
27+
sleep 2
28+
}
2629

27-
# Network snippets
28-
python3 -m devkit.main snippet save ping-test "ping -c 4 google.com"
29-
python3 -m devkit.main snippet save port-check "netstat -tulpn | grep"
30+
# 1. Basic Setup
31+
demo_step "1. Check DevKit Status"
32+
demo_command "devkit --version"
33+
demo_command "devkit status"
3034

31-
echo "✅ Loaded 12 example snippets!"
32-
echo ""
33-
echo "📋 Your snippets:"
34-
python3 -m devkit.main snippet list
35+
# 2. Snippet Management
36+
demo_step "2. Snippet Management"
37+
demo_command "devkit snippet save ports 'lsof -i -P -n | grep LISTEN' --tags 'network,monitoring'"
38+
demo_command "devkit snippet save docker-ps 'docker ps -a' --tags 'docker'"
39+
demo_command "devkit snippet save git-log 'git log --oneline -10' --tags 'git'"
40+
41+
demo_step "2a. List and Search Snippets"
42+
demo_command "devkit snippet list"
43+
demo_command "devkit snippet list --tag docker"
44+
demo_command "devkit snippet search git"
45+
46+
demo_step "2b. Get Snippet Details"
47+
demo_command "devkit snippet get ports"
48+
49+
demo_step "2c. Export Snippets"
50+
demo_command "devkit snippet export demo_snippets.json"
51+
demo_command "cat demo_snippets.json"
52+
53+
# 3. AI Features (if API key configured)
54+
if [ ! -z "$GEMINI_API_KEY" ]; then
55+
demo_step "3. AI Command Suggestions"
56+
demo_command "devkit ask 'find files larger than 100MB' <<< 'n'"
57+
58+
demo_step "3a. AI Command Explanation"
59+
demo_command "devkit explain 'docker run -p 8080:80 nginx'"
60+
else
61+
echo -e "${YELLOW}⚠️ Skipping AI demos (GEMINI_API_KEY not set)${NC}"
62+
fi
63+
64+
# 4. Project Workspace
65+
demo_step "4. Project Workspace Initialization"
66+
demo_command "devkit init --force"
67+
demo_command "ls -la .devkit/"
68+
69+
# 5. Running Snippets (generates history)
70+
demo_step "5. Execute Snippets"
71+
demo_command "devkit snippet run git-log"
72+
73+
# 6. Time-Travel Debugging
74+
demo_step "6. Time-Travel: View Command History"
75+
demo_command "devkit rewind"
76+
demo_command "devkit rewind -n 5"
3577

78+
# 7. Configuration
79+
demo_step "7. View Configuration"
80+
demo_command "devkit config"
81+
82+
# 8. Git Commit Demo (in git repo)
83+
if [ -d .git ]; then
84+
demo_step "8. Git Commit Helper"
85+
86+
# Make a test change
87+
echo "# Demo change" >> DEMO_FILE.txt
88+
git add DEMO_FILE.txt 2>/dev/null || true
89+
90+
# Show interactive commit
91+
echo -e "${CYAN}Demo: Interactive commit (would prompt for type/scope/description)${NC}"
92+
echo "devkit commit"
93+
94+
# Show AI commit
95+
if [ ! -z "$GEMINI_API_KEY" ]; then
96+
echo -e "${CYAN}Demo: AI-generated commit${NC}"
97+
echo "devkit commit --ai"
98+
fi
99+
100+
# Show commit with flags
101+
echo -e "${CYAN}Demo: Commit with signoff${NC}"
102+
echo "devkit commit --ai --signoff"
103+
104+
# Cleanup
105+
git reset HEAD DEMO_FILE.txt 2>/dev/null || true
106+
rm -f DEMO_FILE.txt
107+
else
108+
echo -e "${YELLOW}⚠️ Not in git repo - skipping commit demos${NC}"
109+
fi
110+
111+
# 9. Log Analysis Demo
112+
demo_step "9. Log Analysis"
113+
cat > demo.log << 'LOGEOF'
114+
INFO: Application starting...
115+
INFO: Loading configuration
116+
ERROR: Connection failed to database
117+
ERROR: java.sql.SQLException: Connection timeout
118+
at DatabaseConnector.connect(DatabaseConnector.java:42)
119+
at Application.start(Application.java:15)
120+
WARNING: Retrying connection...
121+
ERROR: Max retries exceeded
122+
LOGEOF
123+
124+
if [ ! -z "$GEMINI_API_KEY" ]; then
125+
demo_command "devkit logs analyze demo.log"
126+
else
127+
demo_command "cat demo.log"
128+
echo -e "${CYAN}(AI analysis would identify: Connection timeout, max retries, suggest fixes)${NC}"
129+
fi
130+
rm demo.log
131+
132+
# 10. Emergency Features
133+
demo_step "10. Emergency Rollback (Panic Mode)"
134+
demo_command "devkit panic --stats"
135+
136+
# 11. Snippet Operations
137+
demo_step "11. Advanced Snippet Operations"
138+
demo_command "devkit snippet export demo_backup.json"
139+
demo_command "devkit snippet delete ports"
140+
demo_command "devkit snippet import demo_backup.json"
141+
142+
# 12. Cleanup Demo
143+
demo_step "12. Cleanup"
144+
demo_command "rm -f demo_snippets.json demo_backup.json"
145+
146+
echo ""
147+
echo -e "${GREEN}=========================================="
148+
echo "Demo Complete!"
149+
echo "==========================================${NC}"
36150
echo ""
37-
echo "🎯 Try these commands:"
38-
echo " python3 -m devkit.main snippet run ports # Show listening ports"
39-
echo " python3 -m devkit.main snippet run size # Show directory sizes"
40-
echo " python3 -m devkit.main snippet run git-undo # Undo last commit"
41-
echo " python3 -m devkit.main snippet run docker-clean # Clean Docker system"
151+
echo "Summary of features demonstrated:"
152+
echo " ✓ Snippet management (save, list, search, run, export, import)"
153+
echo " ✓ AI command suggestions (ask, explain)"
154+
echo " ✓ Project workspace initialization"
155+
echo " ✓ Time-travel debugging (command history)"
156+
echo " ✓ Log analysis"
157+
echo " ✓ Git commit helpers"
158+
echo " ✓ Emergency rollback tools"
42159
echo ""
43-
echo "💡 Pro tip: Use 'python3 -m devkit.main ask <question>' for AI-powered command suggestions!"
160+
echo "Try these yourself:"
161+
echo " devkit ask 'your question'"
162+
echo " devkit commit --ai"
163+
echo " devkit rewind --analyze"
164+
echo " devkit panic"

demo/scenarios.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# DevKit Demo Scenarios
2+
3+
## Scenario 1: Daily Development Workflow (2 min)
4+
```bash
5+
# Save commonly used commands
6+
devkit snippet save build "npm run build && npm test"
7+
devkit snippet save deploy "git push && kubectl rollout restart deployment/app"
8+
9+
# Use them
10+
devkit snippet run build
11+
devkit snippet run deploy
12+
13+
# Review what happened
14+
devkit rewind
15+
```
16+
17+
## Scenario 2: Debugging a Failed Deployment (3 min)
18+
19+
```bash
20+
# Something broke in production
21+
devkit panic
22+
23+
# AI suggests rollback steps
24+
# Review recent commands
25+
devkit rewind --analyze
26+
27+
# Check logs
28+
kubectl logs -f pod-name > error.log
29+
devkit logs analyze error.log
30+
```
31+
32+
## Scenario 3: Git Workflow Enhancement (2 min)
33+
34+
```bash
35+
# Make changes
36+
git add .
37+
38+
# AI generates perfect commit
39+
devkit commit --ai
40+
41+
# Want to edit it?
42+
devkit commit --ai --edit
43+
44+
# Need signoff for compliance?
45+
devkit commit --ai --signoff
46+
```
47+
48+
## Scenario 4: Team Collaboration (2 min)
49+
50+
```bash
51+
# Initialize project workspace
52+
devkit init
53+
54+
# Share snippets with team
55+
devkit snippet export team-snippets.json
56+
# Team members: devkit snippet import team-snippets.json
57+
58+
# Everyone uses same commands
59+
devkit snippet run test
60+
devkit snippet run deploy
61+
```
62+
63+
## Scenario 5: Learning New Tools (1 min)
64+
65+
```bash
66+
# Don't know the command?
67+
devkit ask "find all python files modified today"
68+
69+
# Don't understand a command?
70+
devkit explain "find . -name '*.py' -mtime 0"
71+
72+
# Save it for later
73+
# (AI prompts to save automatically)
74+
```

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
classifiers=[
3737
'Development Status :: 4 - Beta',
3838
'Intended Audience :: Developers',
39-
'Topic :: Software Development :: Tools',
39+
'Topic :: Software Development',
4040
'Topic :: System :: Shells',
4141
'Topic :: Utilities',
4242
'License :: OSI Approved :: MIT License',

0 commit comments

Comments
 (0)