Skip to content

DenDen047/nanokit

 
 

Repository files navigation


                                                   88         88
                                                   88         ""    ,d
                                                   88               88
8b,dPPYba,   ,adPPYYba,  8b,dPPYba,    ,adPPYba,   88   ,d8   88  MM88MMM
88P'   `"8a  ""     `Y8  88P'   `"8a  a8"     "8a  88 ,a8"    88    88
88       88  ,adPPPPP88  88       88  8b       d8  8888[      88    88
88       88  88,    ,88  88       88  "8a,   ,a8"  88`"Yba,   88    88,
88       88  `"8bbdP"Y8  88       88   `"YbbdP"'   88   `Y8a  88    "Y888


🛠️ nanokit - minimal development environment

Platform Powered by Pixi License: MIT

  • ⚡ A lightweight, fast, and efficient cross-platform development setup for Linux (x86/arm), OSX
  • No sudo required - Everything installs to $HOME/.pixi, completely user-local
  • 🪄 Pixi as a shell tool manager - Keep your tools up-to-date by declarative management
  • 🦀 dotter as a simple dotfile manager that links / unlinks dotfiles in nanokit
  • 🐚 zsh 🎩 sheldon 🚀 starship - Modern shell experience with plugin management

⚙️ Setup - All you need is pixi

Step 1: Install pixi

Install pixi following the official installation guide:

curl -fsSL https://pixi.sh/install.sh | sh

If your system doesn't have curl, you can use wget:

wget -qO- https://pixi.sh/install.sh | sh

Warning

Now restart your terminal or shell to make the installation effective.

Step 2: Clone this repository

Install GitHub CLI (recommended) or git:

export PATH="${HOME}/.pixi/bin/:$PATH"
pixi global install gh
# or
pixi global install git

Using 🔀 git:

git clone https://github.com/DenDen047/nanokit.git
cd nanokit

Using :octocat: gh (recommended - includes SSH key setup):

gh auth login

# Where do you use GitHub? → GitHub.com
# What is your preferred protocol? → SSH
# Generate a new SSH key? → Yes
# How would you like to authenticate? → Login with a web browser
gh repo clone DenDen047/nanokit
cd nanokit

Using 🔀 git:

git clone https://github.com/DenDen047/nanokit.git
cd nanokit

Step 3-a: nanokit install (recommended for new environment)

./nanokit install

That's all you need to get started!

Caution

nanokit configures zsh as the default shell for the terminal emulator (e.g. tmux) and use it only for interactive sessions. We recommend using a system-managed shell such as /usr/bin/zsh (or /bin/bash) as the login shell.

Pixi installs zsh in a user-space environment and locks it together with its runtime dependencies (e.g. ncurses, libgcc; see pixi global tree --environment zsh).

If this environment fails, using it as a login shell can prevent system login (e.g. via SSH or WSL). https://tim.siosm.fr/blog/2023/12/22/dont-change-defaut-login-shell/

Step 3-b: Manual Installation (recommended for existing environment)

If you prefer more control over the installation process or are setting up on an existing machine with custom configurations

Install dotter

pixi global install dotter-rs

Symlink configuration files

Check what will be symlinked (dry run):

dotter -d       # dry run: confirm what happens

Deploy the symlinks:

dotter deploy

Install utility tools

Install all necessary tools defined in the global configuration:

pixi global sync

Start your 🐚 zsh

Launch zsh shell or tmux:

zsh
tmux

Everything is setup automatically via 🎩 sheldon.

🔄 Reset All Environment

dotter undeploy -d
dotter undeploy
touch ~/.pixi/manifests/pixi-global.toml
pixi global sync

Step 4: Install fonts required for 🚀 starship (optional)

For local terminals, installing fonts is recommended. Fonts will be installed to $HOME/.local/fonts.

🐧 Linux 🍎 Mac OS 🪟 Windows Terminal
./setup_fonts.sh brew install --cask font-hack-nerd-font choco install nerd-fonts-hack Note: Requires administrator privileges

See Starship Presets for more customization options.

🎨 Customization

🛠️ Global Tools

The following tools are available through pixi-global.toml:

Tool Description Exposed Command GitHub
🔀 git Version control system git, git-cvsserver, git-receive-pack, git-shell, git-upload-archive, git-upload-pack, gitk, scalar git/git
:octocat: gh GitHub CLI gh cli/cli
🔀 git-lfs Version control system git-lfs git/git
🔀 tig TUI client for Git tig jonas/tig
🐚 zsh Z shell zsh, zsh-5.9 zsh-users/zsh
🎩 sheldon Fast and configurable shell plugin manager sheldon rossmacarthur/sheldon
🚀 starship Minimal, beautifl prompt for any shell starship starship/starship
🦀 dotter-rs Dotfile manager dotter SuperCuber/dotter
🔐 sshs TUI client for ssh sshs quantumsheep/sshs
📊 htop Interactive process viewer htop htop-dev/htop
📊 bottom System monitor btm ClementTsang/bottom
🔎 fzf Fuzzy finder fzf junegunn/fzf
📁 tree Directory tree display tree Old-Man-Programmer/tree
📁 go-ghq Git repository manager ghq x-motemen/ghq
🌀 zoxide Smart directory jumper zoxide ajeetdsouza/zoxide
🛠️ make Build automation tool make mirror/make
📋 xsel X11 clipboard manipulation xsel kfish/xsel
🗄️ pueue Local job queue manager pueue, pueued Nukesor/pueue
🪟 tmux Terminal multiplexer tmux tmux/tmux
💽 dua-cli Disk usage analyzer dua Byron/dua-cli
💽 diskonaut Disk space navigator diskonaut imsnif/diskonaut
🦇 bat Better cat with syntax highlighting bat sharkdp/bat
📂 lsdeluxe Modern ls replacement lsd lsd-rs/lsd
⚙️ nodejs Node.js runtime node, npm, npx nodejs/node
⚙️ jq Command-line JSON processor jq jqlang/jq
🌍 xh Friendly and fast tool for sending HTTP requests xh ducaale/xh
☁️ rclone rsync for cloud storage rclone rclone/rclone
☁️ aws CLI for AWS aws aws_completer aws/aws-cli
📝 neovim Neovim with Node.js, Lua, Python support nvim neovim/neovim
📝 helix A post-modern modal text editor hx helix-editor/helix
🌱 direnv Per-directory environment variables direnv direnv/direnv
🍞 bun Fast JavaScript runtime, bundler, test runner bun oven-sh/bun
🎬 ffmpeg Audio/video processing ffmpeg, ffprobe FFmpeg/FFmpeg
🗜️ p7zip 7-Zip archive utility 7z, 7za, 7zr p7zip-project/p7zip
👀 watch Execute a program periodically watch procps-ng/procps
📹 t-rec Terminal recorder (animated GIFs) t-rec sassman/t-rec-rs
🖼️ imagemagick Image manipulation toolkit magick, convert, mogrify, identify, composite, … ImageMagick/ImageMagick

Add your favorite tools with:

pixi search <package-name>
pixi global install <package-name>  # e.g. pixi global install python=3.13

This will automatically update the pixi-global.toml configuration.

pixi global update

automatically upgrade all tools except for version-pinned packages.

see Pixi Global: Declarative Tool Installation for details.

🚀 Starship Settings

Customize your prompt by editing starship.toml. See Starship Themes.

For detailed configuration options, see the Starship documentation.

🎩 Zsh Plugins

Manage plugins by editing zshrc and sheldon.toml.

For more plugin management options, see the Sheldon documentation.

🦀 Dotfiles Management

Manage symlinks for dotfiles by editing .dotter/global.toml.

For detailed configuration options, see the dotter documentation.

🚀 ghq + zoxide = ❤️

The combination of ghq and zoxide creates a magical workflow for repository management:

📦 Repository Management with ghq

ghq provides a clean way to organize remote repository clones. When you run:

ghq get {repo-url}

It automatically clones the repository to a well-structured directory hierarchy under ~/ghq, regardless of your current location. For example:

ghq get https://github.com/user/project
# Creates: ~/ghq/github.com/user/project

🧭 Smart Navigation with zoxide

Once you cd into any directory, zoxide remembers that location. You can then use:

zi  # Interactive fuzzy finder for visited directories
z <partial-name>  # Jump to directory matching the pattern

No more cd ../../../project - just zi and you're there! 🎯

🖥️ Tmux Key Bindings

The tmux configuration uses Ctrl+a as the prefix key (instead of the default Ctrl+b). Here are the essential key bindings:

Basic Commands

Key Binding Description
Ctrl+a then ? Show help and all key bindings
Ctrl+a then r Reload tmux configuration

Window Management

Key Binding Description
Ctrl+a then c Create new window (in current directory)
Ctrl+a then w Choose window from list
Ctrl+a then n Next window
Ctrl+a then p Previous window

Pane Management

Key Binding Description
Ctrl+a then - Split window horizontally
Ctrl+a then ` `
Ctrl+a then h Move to left pane
Ctrl+a then j Move to bottom pane
Ctrl+a then k Move to top pane
Ctrl+a then l Move to right pane

Copy Mode (Vi-style)

Key Binding Description
Ctrl+a then [ Enter copy mode
v Start selection (in copy mode)
y Copy selection (in copy mode)
q Exit copy mode

💡 Tip: All panes and windows are created in the current working directory for better workflow.

📝 Neovim Settings (Optional)

Basic commands to get started:

  • vi - Launch Neovim
  • :q - Quit Neovim
  • :checkhealth - Check Neovim configuration
  • :Lazy - Plugin manager interface
  • Ctrl+P - Fuzzy file finder

🤖 Claude Code Configuration (Optional)

nanokit can manage Claude Code global configuration (~/.claude/settings.json, ~/.claude/CLAUDE.md, custom scripts) via dotter symlinks.

Note

Claude Code itself is installed via npm, not pixi. Only the configuration files are managed by nanokit.

Setup

# Install Claude Code first
curl -fsSL https://claude.ai/install.sh | bash

# Setup configuration and plugins
./nanokit claude-setup

This will:

  1. Symlink configuration files from nanokit/claude/ to ~/.claude/
  2. Register plugin marketplaces and install plugins

Plugins

./nanokit claude-setup で自動インストールされます。別の環境で手動インストールする場合は以下を実行してください。

Step 1: マーケットプレイスの登録

claude plugin marketplace add affaan-m/everything-claude-code
claude plugin marketplace add Lum1104/Understand-Anything
claude plugin marketplace add DenDen047/claude-scientific-skills

Step 2: プラグインのインストール

claude plugin install everything-claude-code@everything-claude-code
claude plugin install understand-anything@understand-anything
claude plugin install scientific-skills@claude-scientific-skills
Plugin Marketplace (GitHub) Description
everything-claude-code affaan-m/everything-claude-code Agent, skill, rule の包括的コレクション
understand-anything Lum1104/Understand-Anything コードベースの知識グラフ生成・探索
scientific-skills DenDen047/claude-scientific-skills 科学計算スキル (データ分析, 可視化, LaTeX 等)

What is managed

File Description
claude/settings.json Global settings (hooks, env vars, plugins, statusLine)
claude/CLAUDE.md Global instructions
claude/scripts/zotero-mcp-server.sh Zotero MCP server lifecycle script

Plugin-managed files (agents/, skills/, commands/, rules/, hooks/) and runtime data are not tracked -- they are managed by Claude Code and its plugins.

Post-setup

Configure machine-specific settings manually:

  • MCP servers: ~/.claude/mcp-configs/mcp-servers.json
  • Local overrides: ~/.claude/settings.local.json

🌙 ARIS - Auto-Research-In-Sleep (Optional)

ARIS は、自律的な ML リサーチ用の Markdown-only スキル集(論文レビューループ、アイデア探索、実験自動化など 50+ 個)です。Claude plugin marketplace には対応していないため、nanokit では optional なサブコマンド として管理します。

Note

ARIS は ./nanokit install では導入されません。必要なときだけ明示的に aris-install を叩いてください。

Install

./nanokit aris-install

これにより以下が行われます:

  1. nanokit/claude/external/aris/ に ARIS リポジトリを shallow clone(.gitignore 済み)
  2. skills/*/ の各スキルを ~/.claude/skills/<skill-name> へ symlink
  3. 既存の同名ファイル(非 symlink)があれば衝突回避のためスキップ

clone 先を nanokit リポジトリ配下に置くことで、どこから持ってきた symlink なのかを後から辿りやすくしています。dotter の管轄外なので、claude/skills/* の固定 symlink とは独立に追加・削除できます。

Update / Uninstall

./nanokit aris-update      # git pull + symlink 再リンク
./nanokit aris-uninstall   # ARIS symlink と clone を削除

aris-uninstall~/.claude/skills/ 配下のうち nanokit/claude/external/aris/ を指している symlink のみ を削除するため、他のスキルには影響しません。

📚 Zotero MCP (Optional)

zotero-mcp をマルチホスト対応で運用するためのサブコマンドです。Mac(Zotero.app 起動中)ではローカル API、Linux サーバー等(Zotero.app なし)では Web API に自動で切り替えます。

Note

Zotero MCP は ./nanokit install では導入されません。利用したい環境でのみ zotero-mcp-install を実行してください。

Install

新規マシンセットアップ後、API キーを対話的に登録:

./nanokit zotero-mcp-install

これにより以下が行われます:

  1. claude/mcp-servers/zotero-mcp/pixi.toml から pixi env をインストール (zotero-mcp-server[semantic])
  2. Zotero API key と userID を OS の secret store に登録(macOS Keychain / Linux secret-tool / fallback: ~/.config/nanokit/secrets.env
  3. Claude Code に MCP サーバー (HTTP transport, localhost:8321) を登録(冪等)
  4. ~/.claude/scripts/zotero-mcp-server.sh を再起動してヘルスチェック

API キーは https://www.zotero.org/settings/keys/new で発行してください(推奨パーミッション: library/notes access、write は OFF 推奨、file access は将来のために ON 推奨)。

動作モードの自動切替

実行環境 モード 取得可能なデータ
Zotero.app 起動中 ZOTERO_LOCAL=true メタデータ + PDF 本体 + 注釈作成可
Zotero.app 停止中 / Linux 他 ZOTERO_LOCAL=false メタデータ + フルテキスト(インデックス)+ ノート + タグ + semantic search

判定は curl http://localhost:23119/connector/ping の成否で自動。詳細は specs/zotero-mcp-multi-host-setup.md

Update / Uninstall

./nanokit zotero-mcp-update      # pixi update + サーバー再起動
./nanokit zotero-mcp-uninstall   # pixi env 削除 + MCP client 解除 + credentials 削除(対話)

手動操作

bash ~/.claude/scripts/zotero-mcp-server.sh status
bash ~/.claude/scripts/zotero-mcp-server.sh stop
bash ~/.claude/scripts/zotero-mcp-server.sh start
tail -f ~/.claude/debug/zotero-mcp.log

🧪 Try nanokit in your OS

Want to test nanokit without affecting your current setup? Create a temporary user:

sudo adduser nanokit
su - nanokit
# Try nanokit setup here

Cleanup test user:

sudo userdel -r nanokit    # Remove user and home directory

References

About

nanokit - a minimal development environment powered by pixi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Shell 80.7%
  • Lua 19.3%