npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

service-setup-cokacdir

v1.0.3

Published

Register cokacdir as a system service with a single command (Linux & macOS)

Readme

service-setup-cokacdir

Registers the cokacdir Telegram bot server as a system service with a single command.

  • Automatically detects Linux and macOS
  • No sudo required
  • Starts automatically on boot
  • Restarts automatically on crash
  • Re-run the same command to update tokens

Install & Run

npx -y service-setup-cokacdir <BOT_TOKEN>

Multiple tokens are supported.

npx -y service-setup-cokacdir <BOT_TOKEN1> <BOT_TOKEN2> <BOT_TOKEN3>

That's it. The OS is detected automatically and the service starts immediately.

Updating Tokens

Just re-run the same command. The existing service is stopped automatically and restarted with the new configuration.

npx -y service-setup-cokacdir <NEW_TOKEN1> <NEW_TOKEN2>

Service Management

Linux

# Check status
systemctl --user status cokacdir

# View logs
tail -f ~/.local/log/cokacdir.log

# Stop
systemctl --user stop cokacdir

# Remove completely
systemctl --user disable cokacdir && rm ~/.config/systemd/user/cokacdir.service

macOS

# Check status
launchctl list | grep com.cokacdir.server

# View logs
tail -f ~/Library/Logs/cokacdir/cokacdir.log

# Stop
launchctl bootout gui/$(id -u)/com.cokacdir.server

# Remove completely
launchctl bootout gui/$(id -u)/com.cokacdir.server && rm ~/Library/LaunchAgents/com.cokacdir.server.plist

How It Works

The command detects the OS and performs the following steps.

| | Linux | macOS | |--|--|--| | Service file | ~/.config/systemd/user/cokacdir.service | ~/Library/LaunchAgents/com.cokacdir.server.plist | | Registration | systemctl --user enable & start | launchctl enable + launchctl bootstrap | | Auto-restart | Restart=always | KeepAlive=true | | Start on boot | loginctl enable-linger | RunAtLoad=true | | Log directory | ~/.local/log/ | ~/Library/Logs/cokacdir/ |

Requirements

  • Linux (systemd) or macOS
  • cokacdir installed
  • Node.js >= 14

License

MIT