Skip to content

Repository files navigation

My Dotfiles

My personal collection of dotfiles and scripts to streamline the setup of a new Linux or macOS environment.

🚀 Installation

Run the following command to install the necessary tools and set up the environment:

curl -fsSL https://raw.githubusercontent.com/comchienlab/linux-setup/main/install.sh | bash

✨ Quick Commands

These are a series of "quick" commands to automate common developer tasks.

fsetup - Quick Setup Operations

This script provides a menu-driven interface using gum to perform various setup tasks like updating the system, installing development tools, and setting up programming language environments.

To run, type the following command in your terminal:

fsetup
fgit - Quick Git Operations

A script to simplify common Git workflows. It helps with tasks like adding, committing, and pushing changes, as well as more complex operations like rebasing and tagging.

To run, type the following command in your terminal:

fgit
qkcommit - Quick Commit Operations

This script helps you write conventional commit messages easily. It prompts for the type of change, scope, and description.

To run, type the following command in your terminal:

qkcommit
qkmacos - Quick macOS Setup

This script automates the setup and configuration of a macOS environment. It installs Homebrew, essential applications, and developer tools.

To install and run:

sudo curl -fsSL -o /usr/local/bin/qkmacos https://raw.githubusercontent.com/comchienlab/dotfiles/main/macos/qkmacos.sh && sudo chmod +x /usr/local/bin/qkmacos
qkmacos

🛠️ Installers & Utilities

A collection of scripts to install various tools and perform system utilities.

n8n-installer.sh - Install n8n

Installs n8n, a free and source-available workflow automation tool.

To install:

bash <(curl -fsSL https://raw.githubusercontent.com/comchienlab/dotfiles/main/n8n/n8n-installer.sh)
rclone-tool.sh - Install rclone tool

Installs and configures rclone, a command-line program to manage files on cloud storage.

To install:

sudo curl -fsSL -o /usr/local/bin/cccrclone https://raw.githubusercontent.com/comchienlab/dotfiles/main/rclone/rclone-tool.sh && sudo chmod +x /usr/local/bin/cccrclone
nerdfont-installer.sh - Install Nerd Fonts

Installs Nerd Fonts, which are popular for developers and provide a wide range of glyphs and icons.

To run:

bash <(curl -fsSL https://raw.githubusercontent.com/comchienlab/dotfiles/main/fonts/nerdfont-installer.sh)
create_swap.sh - Create Swap File

A script to create and enable a swap file on a Linux system, which is useful when the system runs out of physical RAM.

To run:

bash <(curl -fsSL https://raw.githubusercontent.com/comchienlab/dotfiles/main/create_swap.sh)
debloat.sh - Debloat System

This script helps in removing pre-installed software that you may not need, freeing up disk space and system resources.

To run:

bash <(curl -fsSL https://raw.githubusercontent.com/comchienlab/dotfiles/main/debloat.sh)
qkflyway.sh - Flyway Database Migrations

A helper script for running Flyway database migrations.

To run:

bash <(curl -fsSL https://raw.githubusercontent.com/comchienlab/dotfiles/main/backend/qkflyway.sh)

🤖 GoClaw — AI Agent Gateway

Scripts để triển khai GoClaw — AI Agent Gateway viết bằng Go — trên VPS cấu hình thấp, không dùng Docker.

goclaw.sh - GoClaw Manager (chạy từ máy local)

Wrapper script với menu tương tác để quản lý toàn bộ vòng đời GoClaw từ máy local qua SSH:

  • Setup VPS lần đầu
  • Deploy (build local + copy lên VPS)
  • Xem status / logs / restart
  • SSH trực tiếp vào VPS
  • Sửa config
# Chạy remote (không cần clone repo):
bash <(curl -fsSL https://raw.githubusercontent.com/comchienlab/dotfiles/main/goclaw/goclaw.sh)

# Hoặc nếu đã clone repo:
bash goclaw/goclaw.sh --host root@1.2.3.4

Config VPS được lưu vào ~/.goclaw.conf (tự động, không cần nhập lại mỗi lần). Khi chạy remote, script tự download goclaw-setup.shgoclaw-deploy.sh từ GitHub khi cần.

goclaw-setup.sh - Cài đặt VPS (chạy trên VPS)

Cài đặt toàn bộ môi trường server:

  • PostgreSQL 16 + pgvector (local) hoặc kết nối External DB qua URL
  • Go 1.22+ và GoClaw binary (go install)
  • systemd service với auto-restart
  • UFW firewall
  • Caddy reverse proxy + HTTPS tự động (nếu có domain)
  • Tối ưu hóa VPS: swap 2GB, sysctl, ulimits

Cấu hình port:

  • INTERNAL_PORT — port app lắng nghe (default: 3000)
  • EXTERNAL_PORT — port public nếu không có domain (default: 8080)
  • Có domain → Caddy proxy 443 → INTERNAL_PORT (HTTPS tự động)
# Chạy thẳng trên VPS (không cần clone repo):
sudo bash <(curl -fsSL https://raw.githubusercontent.com/comchienlab/dotfiles/main/goclaw/goclaw-setup.sh)
goclaw-deploy.sh - Build & Deploy từ máy local

Build binary và Web UI trên máy local, sau đó copy lên VPS:

  • Cross-compile Go binary cho linux/amd64 hoặc arm64
  • Build Web UI tự động phát hiện package manager (npm/bun/pnpm)
  • Rsync static files lên VPS với --delete
  • Backup binary cũ trước khi replace
  • Restart service và verify
# Chạy remote (không cần clone repo):
bash <(curl -fsSL https://raw.githubusercontent.com/comchienlab/dotfiles/main/goclaw/goclaw-deploy.sh) \
  --host root@1.2.3.4 --dir ~/projects/goclaw

# Hoặc qua goclaw.sh menu → [2] Deploy

Yêu cầu trên máy local: go 1.22+, rsync, ssh.


👩‍🏫 9Router

Interactive menu (no args):

curl -fsSL http://st.changcomchien.workers.dev/9router | sudo bash

Direct subcommand (note -s -- — required when passing args via pipe):

curl -fsSL https://raw.githubusercontent.com/comchienlab/dotfiles/main/llm/setup_9router.sh | sudo bash -s -- install

After install, the toolkit installs itself as /usr/local/bin/9router, so:

sudo 9router doctor      # weekly health check
sudo 9router update      # pull latest + redeploy
sudo 9router status      # one-screen summary
sudo 9router rollback    # restore previous build

⚙️ Configuration Files

This repository also includes configuration files for various tools to maintain a consistent development environment.

  • Zsh & Starship: .zshrc and starship.toml for a customized and informative shell prompt.
  • Ghostty: ghostty/config and ghostty/custom.css for the Ghostty terminal emulator.
  • Zed: zed/setting.json for the Zed code editor.

About

My Personal Linux Distro setup

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages