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
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
# Developer Commands Corpus
# Synthetic training data for aprender-shell base model
# Version: 1.0.0
# License: MIT
#
# This corpus contains common developer shell commands without any
# sensitive data. Users can fine-tune with their own history.

# ==============================================================================
# Git Commands (most common developer tool)
# ==============================================================================

# Basic operations
git status
git status -s
git status --short
git diff
git diff --staged
git diff HEAD
git diff HEAD~1
git diff --stat

# Commits
git commit -m "fix: resolve issue"
git commit -m "feat: add new feature"
git commit -m "docs: update readme"
git commit -m "test: add unit tests"
git commit -m "refactor: improve code"
git commit -m "chore: update deps"
git commit --amend
git commit --amend --no-edit
git commit -a -m "quick fix"

# Branches
git branch
git branch -a
git branch -d feature
git branch -D feature
git checkout main
git checkout master
git checkout -b feature
git checkout -b feature/new
git checkout -b fix/bug
git switch main
git switch -c feature

# Remote operations
git push
git push origin main
git push origin master
git push -u origin main
git push --force-with-lease
git pull
git pull --rebase
git pull origin main
git fetch
git fetch --all
git fetch --prune

# Stash
git stash
git stash pop
git stash list
git stash drop
git stash apply
git stash save "work in progress"

# Log
git log
git log --oneline
git log --oneline -10
git log --oneline -20
git log --graph
git log --graph --oneline
git log --stat
git log -p
git log --author="name"

# Reset and revert
git reset HEAD
git reset HEAD~1
git reset --soft HEAD~1
git reset --hard HEAD~1
git revert HEAD
git revert HEAD~1

# Rebase
git rebase main
git rebase master
git rebase -i HEAD~3
git rebase --continue
git rebase --abort

# Merge
git merge main
git merge master
git merge feature
git merge --no-ff feature
git merge --squash feature

# Tags
git tag
git tag v1.0.0
git tag -a v1.0.0 -m "release"
git push --tags

# Clean
git clean -fd
git clean -fdx
git clean -n

# Remote
git remote -v
git remote add origin url
git remote remove origin

# ==============================================================================
# Cargo (Rust)
# ==============================================================================

cargo build
cargo build --release
cargo build --all-features
cargo build --no-default-features
cargo test
cargo test --all
cargo test --all-features
cargo test --lib
cargo test --doc
cargo test --release
cargo test integration
cargo test unit
cargo run
cargo run --release
cargo run --example demo
cargo run --example basic
cargo check
cargo check --all-features
cargo clippy
cargo clippy --all-targets
cargo clippy -- -D warnings
cargo clippy --fix
cargo fmt
cargo fmt --check
cargo fmt --all
cargo doc
cargo doc --open
cargo doc --no-deps
cargo bench
cargo bench --all
cargo clean
cargo update
cargo add serde
cargo add tokio
cargo remove serde
cargo publish
cargo publish --dry-run
cargo install ripgrep
cargo install cargo-watch
cargo tree
cargo tree -d
cargo audit
cargo deny check

# ==============================================================================
# Docker
# ==============================================================================

docker build -t app .
docker build -t app:latest .
docker build --no-cache -t app .
docker run -it ubuntu bash
docker run -d nginx
docker run -d -p 8080:80 nginx
docker run -d -p 3000:3000 node
docker run --rm -it alpine sh
docker ps
docker ps -a
docker ps -q
docker images
docker images -a
docker stop container
docker start container
docker restart container
docker rm container
docker rm -f container
docker rmi image
docker rmi -f image
docker logs container
docker logs -f container
docker logs --tail 100 container
docker exec -it container bash
docker exec -it container sh
docker compose up
docker compose up -d
docker compose down
docker compose ps
docker compose logs
docker compose build
docker compose pull
docker network ls
docker network create net
docker volume ls
docker volume create vol
docker system prune
docker system prune -a

# ==============================================================================
# Kubernetes (kubectl)
# ==============================================================================

kubectl get pods
kubectl get pods -A
kubectl get pods -n namespace
kubectl get pods -o wide
kubectl get pods -o yaml
kubectl get services
kubectl get svc
kubectl get deployments
kubectl get deploy
kubectl get nodes
kubectl get namespaces
kubectl get ns
kubectl get all
kubectl get all -A
kubectl describe pod name
kubectl describe svc name
kubectl describe deploy name
kubectl describe node name
kubectl logs pod
kubectl logs -f pod
kubectl logs --tail 100 pod
kubectl logs pod -c container
kubectl exec -it pod -- bash
kubectl exec -it pod -- sh
kubectl apply -f file.yaml
kubectl apply -f .
kubectl apply -k .
kubectl delete -f file.yaml
kubectl delete pod name
kubectl delete deploy name
kubectl scale deploy name --replicas=3
kubectl rollout status deploy name
kubectl rollout restart deploy name
kubectl rollout undo deploy name
kubectl port-forward pod 8080:80
kubectl port-forward svc/name 8080:80
kubectl config get-contexts
kubectl config use-context name
kubectl config current-context
kubectl top pods
kubectl top nodes
kubectl create namespace name
kubectl create secret generic name
kubectl edit deploy name

# ==============================================================================
# npm / Node.js
# ==============================================================================

npm install
npm install --save-dev
npm install -D
npm install package
npm install -g package
npm uninstall package
npm update
npm run build
npm run dev
npm run start
npm run test
npm run lint
npm run format
npm run deploy
npm run watch
npm init
npm init -y
npm publish
npm version patch
npm version minor
npm version major
npm outdated
npm audit
npm audit fix
npm ci
npm cache clean --force
npx create-react-app app
npx next dev
npx prisma migrate

# ==============================================================================
# Python
# ==============================================================================

python main.py
python -m pytest
python -m pytest -v
python -m pytest -xvs
python -m pytest --cov
python -m pip install package
python -m pip install -r requirements.txt
python -m pip install -e .
python -m pip freeze
python -m venv venv
python -c "print('hello')"
pip install package
pip install -r requirements.txt
pip install --upgrade pip
pip freeze
pip list
pip show package
pip uninstall package
pytest
pytest -v
pytest -xvs
pytest --cov
pytest tests/
pytest tests/unit/
black .
black --check .
isort .
isort --check .
mypy .
mypy src/
flake8
flake8 src/
ruff check .
ruff format .
poetry install
poetry add package
poetry update
poetry run pytest
uvicorn main:app --reload
gunicorn main:app

# ==============================================================================
# AWS CLI
# ==============================================================================

aws s3 ls
aws s3 ls s3://bucket
aws s3 cp file s3://bucket/
aws s3 sync . s3://bucket/
aws s3 rm s3://bucket/file
aws ec2 describe-instances
aws ec2 start-instances --instance-ids id
aws ec2 stop-instances --instance-ids id
aws lambda list-functions
aws lambda invoke --function-name func out.json
aws ecs list-clusters
aws ecs list-services --cluster name
aws logs tail /aws/lambda/func
aws cloudformation deploy --stack-name name --template-file template.yaml
aws sts get-caller-identity
aws configure list

# ==============================================================================
# General Unix/Linux
# ==============================================================================

ls
ls -la
ls -lah
ls -ltr
ll
cd ..
cd -
pwd
mkdir dir
mkdir -p path/to/dir
rm file
rm -rf dir
cp file dest
cp -r dir dest
mv file dest
cat file
head file
head -20 file
tail file
tail -f file
tail -100 file
grep pattern file
grep -r pattern .
grep -rn pattern .
find . -name "*.rs"
find . -type f -name "*.txt"
which command
whereis command
man command
echo "text"
echo $VARIABLE
touch file
chmod +x file
chmod 755 file
chown user file
ln -s target link
wc -l file
sort file
uniq file
diff file1 file2
tar -czf archive.tar.gz dir
tar -xzf archive.tar.gz
zip -r archive.zip dir
unzip archive.zip
curl url
curl -X POST url
curl -o file url
wget url
wget -O file url
ssh server
ssh user@server
scp file server:path
rsync -avz src dest
htop
top
ps aux
ps aux | grep process
kill pid
killall process
df -h
du -sh .
du -sh *
free -h
uptime
history
history | grep command
clear
exit

# ==============================================================================
# Make
# ==============================================================================

make
make build
make test
make clean
make install
make all
make -j4
make -j8

# ==============================================================================
# Terraform
# ==============================================================================

terraform init
terraform plan
terraform apply
terraform apply -auto-approve
terraform destroy
terraform fmt
terraform validate
terraform output
terraform state list
terraform import resource id

# ==============================================================================
# Misc Developer Tools
# ==============================================================================

code .
code file
vim file
nvim file
nano file
less file
bat file
rg pattern
rg pattern -t rust
fd pattern
fd -e rs
jq .
jq '.field'
tree
tree -L 2
watch command
tmux
tmux new -s name
tmux attach -t name
tmux ls
screen
htop
lazygit
gh pr create
gh pr list
gh pr view
gh issue list
gh repo clone owner/repo