txthinking / nami

A clean and tidy decentralized package manager.

Home Page:https://www.txthinking.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nami

A clean and tidy decentralized package manager.

❤️ A project by txthinking.com

Install

bash <(curl https://bash.ooo/nami.sh)

⚠️ Windows user should run in Git Bash, Video

Example

nami install brook
nami list
nami remove brook

You can also upgrade nami by nami

nami install nami
With HTTPS_PROXY environment
export HTTPS_PROXY=http://127.0.0.1:8010
nami install brook
Keep PATH with sudo
sudo visudo
Defaults        !env_reset
# Defaults       secure_path=...

All officially maintained packages

Package Description Website
7z 7-Zip is a file archiver with a high compression ratio. Website
agg asciinema gif generator Website
brook-manager A Web UI for fully automatic management of Brook. 一个全自动管理 Brook 的 Web UI Website
brook A cross-platform network tool designed for developers. 一个为开发者设计的跨平台网络工具. Website
brookscript Brook One-click script. 一键安装脚本 Website
bun Incredibly fast JavaScript runtime, bundler, transpiler and package manager – all in one. Website
caddy Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS Website
cidr-merger A simple command line tool to merge ip/ip cidr/ip range, supports IPv4/IPv6 Website
cloudflare cloudflare cli Website
cloudupload Upload files to multiple Cloud Storage in parallel. Automatically apply for ssl certificate with your domain. Website
cmake CMake, the cross-platform, open-source build system. Website
cowsay cowsay is reborn. Neo Cowsay has written in Go. Website
curl curl with http3 support Website
d2 D2 is a modern diagram scripting language that turns text to diagrams. Website
deno A modern runtime for JavaScript and TypeScript. Website
denobundle Bundle assets into the binary with deno compile Website
fd A simple, fast and user-friendly alternative to 'find' Website
ffmpeg A complete, cross-platform solution to record, convert and stream audio and video. Website
fzf A command-line fuzzy finder Website
go An open-source programming language supported by Google Website
hancock Manage multiple remote servers and execute commands remotely. 管理多个远程服务器并远程执行命令 Website
hey HTTP load generator, ApacheBench (ab) replacement Website
httpserver This is a very simple http static server, sometimes we need it for testing Website
icnsify Easily create .icns files (Mac Icons) Website
ipatool Command-line tool that allows searching and downloading app packages (known as ipa files) from the iOS App Store Website
ix command line pastebin. Website
jinbe Jinbe can add auto start command at boot. Zero-Configuration. Jinbe 可以添加开机自动启动命令. 无需配置. Website
joker Joker can turn process into daemon. Zero-Configuration. Joker 可以将进程变成守护进程. 无需配置. Website
jb jb = javascript + bash Website
jq Command-line JSON processor Website
mad Generate root CA and derivative certificate for any domains and any IPs. 为任何域名和 IP 生成证书 Website
markdown markdown converter Website
marp A CLI interface for Marp and Marpit based converters Website
minify Go minifiers for web formats Website
nami The easy way to download anything from anywhere. 从任何地方下载任何东西 Website
nico A HTTP3 web server for reverse proxy and single page application, automatically apply for ssl certificate, Zero-Configuration. Website
ninja a small build system with a focus on speed Website
node Node.js is an open-source, cross-platform JavaScript runtime environment. Website
protoc Protocol Buffers - Google's data interchange format Website
rsrc Tool for embedding .ico & manifest resources in Go programs for Windows. Website
shadowsocks A Rust port of shadowsocks Website
sshexec A command-line tool to execute remote command through ssh Website
stuntman NAT type detection. NAT 类型检测 Website
tengo A fast script language for Go Website
tun2brook Proxy all traffic just one line command. tun2socks, tun2brook. IPv4 and IPv6, TCP and UDP. 只需一行命令. 让系统所有流量全部走 socks5, brook server, brook wsserver, brook wssserver. Website
yt-dlp Command-line program to download videos from YouTube.com and other video sites Website
zig Zig is a general-purpose programming language and toolchain for maintaining robust, optimal and reusable software. Website
zigup Download and manage zig compilers. Website
zoro zoro can help you expose local server to external network. Support both TCP/UDP, of course support HTTP. Zero-Configuration. zoro 帮助你将本地端口暴露在外网.支持 TCP/UDP, 当然也支持 HTTP. 内网穿透. Website

Directory

  • $HOME/.nami: All files of nami
  • $HOME/.nami/bin: When installing nami, this path is already added to your $PATH
  • $HOME/.nami/cache: This directory will be emptied before installing package
    • If the package can be standalone executable files:

      After the installation process is finished, nami will copy these files to the $HOME/.nami/bin directory

    • If the package is a directory:
      • The script should save the directory into here. Such as go.tengo or node.js
      • And write the relative paths of executable files to links file, one path per line. Such as go.tengo or node.js

      After the installation process is finished, nami will copy the directory to the $HOME/.nami/dir/ directory and will create symbolic links to the $HOME/.nami/bin based on links

    • Write version to version file
  • $HOME/.nami/copied: This is usually used if the command to be installed is running, such as brook.tengo, you may:
    1. get the processes
    2. stop the processes
    3. copy(not move) the commands from $HOME/.nami/cache to $HOME/.nami/bin
    4. copy the commands from $HOME/.nami/cache to $HOME/.nami/copied, this prompts nami not to perform duplicate operations
    5. run the previously stopped processes again

Script

tengo

Nami supports tengo script, there is a built-in module import("nami") for convenience:

  • nami.os: linux/darwin/windows/...
  • nami.arch: amd64/arm64/...
  • nami.home_dir: $HOME
  • nami.bin_dir: $HOME/.nami/bin
  • nami.cache_dir: $HOME/.nami/cache
  • nami.copied_dir: $HOME/.nami/copied
  • append_file(file string, text string) => error
  • write_file(file string, text string) => error
  • sh(name string, args...) => error: run command
  • sh1(name string, args...) => bytes/error: run command and return stdout
javascript

Nami supports jb script, there is a built-in global object nami for convenience:

  • nami.os: linux/darwin/windows/...
  • nami.arch: amd64/arm64/...
  • nami.home_dir: $HOME
  • nami.bin_dir: $HOME/.nami/bin
  • nami.cache_dir: $HOME/.nami/cache
  • nami.copied_dir: $HOME/.nami/copied

Run local script

nami install ./exmaple.js

PR

Fork nami project, put exmaple.js to package directory, create PR, then you can

nami install example

Run remote script

nami install https://yourserver.com/exmaple.js

License

Licensed under The GPLv3 License

About

A clean and tidy decentralized package manager.

https://www.txthinking.com

License:GNU General Public License v3.0


Languages

Language:Go 59.1%Language:JavaScript 37.0%Language:Shell 3.9%