Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

g4c

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

g4c

A basic pure js git CLI implementation based on isomorphic-git.

  • 1.5.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-96.55%
Maintainers
1
Weekly downloads
 
Created
Source

G4C logo


# g4c - Git for Cloud A basic pure js git CLI implementation based on isomorphic-git.

Open in StackBlitz


Commands supported

- g4c clone URL
- g4c clone URL DIRECTORY
- g4c clone # (automatically clones from package.json, or secrets file)
- g4c checkout --force HEAD
- g4c pull
- g4c pull --ff-only
- g4c status
- g4c add --all
- g4c commit -m "My commit message"
- g4c push

TODO:

- git # As an alias, comming soon
- g4c add FILE(s)
- g4c add .
- git pull origin pull/123/head

Setup

  • npm i -D g4c
  • npm i -g g4c -- Global install

Goals

  1. Make common git commands easy to use in JavaScript shells 🚀
    • This includes commands such as git clone, git pull, and git push.
  2. Provide configuration options via config file, package.json and ENV variables ⚙️
    • This will make it easier for developers to customize the behavior of g4c to match their specific needs.
  3. Minimize cold-boot time and overhead in browser environments ⏱️
    • This is important for web IDEs. By minimizing the cold-boot time, developers can maximize cycle time and review PR's more efficiently.
  4. Improve the developer experience (DX) for JS devs as much as possible 👩‍💻
    • Following in the foot steps of vite and git to improve workflows.

Configuration Precedence

  • First, the long form package.json -> repository field is read
  • Then, package.json -> author field is read for email and name
  • Then, package.json -> g4c
  • Finally, SECRETS.g4c.json can veto all others
  • Unless, yoy provided an argument in the command line

All of these are optional:

// SECRETS.g4c.json
{
  "proxy": "https://cors.isomorphic-git.org",
  "useProxyOnBareMetal": false,
  "username": "inu",
  "password": "neko",
  "authorName": "John Doe",
  "authorEmail": "john@example.com",
  "repoUrl": "https://github-sucks.com/user/project.git"
}

Keywords

FAQs

Package last updated on 09 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc