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 🙏

© 2024 – Pkg Stats / Ryan Hefner

mango-admin

v0.1.1

Published

CLI for Mango

Downloads

7

Readme

Mango CLI

A commandline tool for Mango. Supports repository creation and management. It works like Github for repositories. See the main Mango repository for further explanation.

Usage

Creating a repository

$ mango-admin create
Initialising...
Creating new repository with administrator 0xaf8843081fd0dc1c4b12053d0ec123a10b91de0e
Sent transaction: 0xe95567ee6fdee21e02061ef6e33f2659943509ca5af5d953dc987ad118ed57fc
Repository created: 0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59

And then uploading a repo:

$ git remote add mango mango://0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59
$ git push mango master
Counting objects: 17, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (17/17), done.
Writing objects: 100% (17/17), 5.21 KiB | 0 bytes/s, done.
Total 17 (delta 7), reused 0 (delta 0)
To mango://0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59
 * [new branch]      master -> master
$

Display status of repository

An empty repository:

$ mango-admin --repo 0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59 status
Initialising...
Checking status of repository 0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59
No references
No snapshosts

A repository with a single push:

$ mango-admin --repo 0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59 status
Initialising...
Checking status of repository 0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59
Reference: refs/heads/master -> bc801074362358d5b91bc76a25785fd505755303
Snaphost #0: QmcRU1DukhtXkHFqjNCQeS3nbQYRgB4zgJpkGJiSghCuou

Adding users

$ mango-admin --repo 0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59 authorize 0x01d3400d88796f893e8183036b047c9e2474080b
Initialising...
Authorizing 0x01d3400d88796f893e8183036b047c9e2474080b for 0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59 as committer
Sent transaction: 0xb80a66ec59a923245d91ce8f112519fb0270cbd5cd13bfa1f379aa0f06a601f7

Deleting users

$ mango-admin --repo 0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59 deauthorize 0x01d3400d88796f893e8183036b047c9e2474080b
Initialising...
Deauthorizing 0x01d3400d88796f893e8183036b047c9e2474080b for 0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59 as committer
Sent transaction: 0x176b64b6c91da229c7b02494825caab2e7757beaa7626a5573f7ff25a3bf6a35

Add administrator

$ mango-admin --repo 0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59 authorize --admin 0x01d3400d88796f893e8183036b047c9e2474080b
Initialising...
Authorizing 0x01d3400d88796f893e8183036b047c9e2474080b for 0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59 as admin
Sent transaction: 0x604f2c6a6958e331ff9696a7f36528c6117eda6ab37decb140ebf5011d3c619b

Remove administrator

$ mango-admin --repo 0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59 deauthorize --admin 0x01d3400d88796f893e8183036b047c9e2474080b
Initialising...
Deauthorizing 0x01d3400d88796f893e8183036b047c9e2474080b for 0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59 as admin
Sent transaction: 0x76b0e259f48e4b8669bfe8393b25ff645409db4c678c3e0dd5e7d5b299260d7f

Mark a repository obsolete

$ mango-admin --repo 0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59 obsolete
Initialising...
Marking 0x8add9d064bbd29f3118f11ee46abe0ad9e45aa59 as obsolete
Sent transaction: 0x267ab9b49751b0c3d82e04c4643eed39940e67b8c476c1d908469ec282c63cb4

Note: this will mark a repository obsolete, but will not delete any data.

Deleting a repository

Should this be supported?

License

GPL v3

Copyright (C) 2016 Alex Beregszaszi