All Projects → jonschlinkert → Get File

jonschlinkert / Get File

Licence: mit
CLI and API to get a single file from Github repository.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Get File

Httpie
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie
Stars: ✭ 53,052 (+589366.67%)
Mutual labels:  api, cli
Cpx
A cli tool to watch and copy file globs.
Stars: ✭ 394 (+4277.78%)
Mutual labels:  cli, file
Syno
Simple Node.js wrapper and CLI for Synology DSM REST API 5.x and 6.x.
Stars: ✭ 255 (+2733.33%)
Mutual labels:  api, cli
Emuto
manipulate JSON files
Stars: ✭ 180 (+1900%)
Mutual labels:  api, cli
Instapy Cli
✨ Python library and CLI to upload photo and video on Instagram. W/o a phone!
Stars: ✭ 498 (+5433.33%)
Mutual labels:  api, cli
Autoserver
Create a full-featured REST/GraphQL API from a configuration file
Stars: ✭ 188 (+1988.89%)
Mutual labels:  api, cli
Memento
Memento is a development-only tool that caches HTTP calls once they have been executed.
Stars: ✭ 380 (+4122.22%)
Mutual labels:  api, cli
Scobot
SCORM API for Content. JavaScript library, QUnit tests and examples.
Stars: ✭ 128 (+1322.22%)
Mutual labels:  api, content
Upash
🔒Unified API for password hashing algorithms
Stars: ✭ 484 (+5277.78%)
Mutual labels:  api, cli
Flextype
Hybrid Content Management System with the freedom of a headless CMS and with the full functionality of a traditional CMS
Stars: ✭ 436 (+4744.44%)
Mutual labels:  api, content
Youtubeshop
Youtube autolike and autosubs script
Stars: ✭ 177 (+1866.67%)
Mutual labels:  api, cli
Exiftool
ExifTool meta information reader/writer
Stars: ✭ 832 (+9144.44%)
Mutual labels:  api, cli
Mojo Webqq
【重要通知:WebQQ将在2019年1月1日停止服务,此项目目前已停止维护,感谢大家四年来的一路陪伴】使用Perl语言(不会没关系)编写的smartqq/webqq客户端框架(非GUI),可通过插件提供基于HTTP协议的api接口供其他语言或系统调用
Stars: ✭ 1,755 (+19400%)
Mutual labels:  api, cli
Contentful Cli
The official Contentful command line interface. Use Contentful features straight from the command line!
Stars: ✭ 200 (+2122.22%)
Mutual labels:  api, cli
Loophole
Polar devices Python API and CLI.
Stars: ✭ 136 (+1411.11%)
Mutual labels:  api, cli
Replace In File
A simple utility to quickly replace contents in one or more files
Stars: ✭ 369 (+4000%)
Mutual labels:  cli, file
Trino
Trino: Master your translations with command line!
Stars: ✭ 118 (+1211.11%)
Mutual labels:  api, cli
Directus
Open-Source Data Platform 🐰 — Directus wraps any SQL database with a real-time GraphQL+REST API and an intuitive app for non-technical users.
Stars: ✭ 13,190 (+146455.56%)
Mutual labels:  api, content
Ola
The Open Lighting Architecture - The Travel Adaptor for the Lighting Industry
Stars: ✭ 424 (+4611.11%)
Mutual labels:  api, cli
Ponzu
Headless CMS with automatic JSON API. Featuring auto-HTTPS from Let's Encrypt, HTTP/2 Server Push, and flexible server framework written in Go.
Stars: ✭ 5,373 (+59600%)
Mutual labels:  api, cli

get-file NPM version NPM monthly downloads NPM total downloads Linux Build Status

CLI to get a single file from Github repository.

CLI

CLI installation

Install globally with npm

$ npm install --global get-file

CLI usage

Specify the repo and filename:

get-file assemble/assemble README.md

List files

See a list of files for a repo before downloading one:

get-file --list assemble/assemble

API

API installation

Install with npm:

$ npm install get-file

API usage

get

Get an individual file and return a stream in the callback.

Params

  • repo {String}: Repository to get file from.
  • filename {String}: file to get.
  • cb {Function}: Callback function that takes err and res arguments.

Example

var get = require('get-file');
get('jonschlinkert/get-file', 'package.json', function(err, res) {
  if (err) return console.error(err);
  var file = fs.createWriteStream('package.json');
  res.pipe(file);
});

.files

List the files in a given repository.

Params

  • repo {String}: Repository to get list of files.
  • cb {Function}: Function that takes err and files arguments

Example

var get = require('get-file');
get.files('jonschlinkert/get-file', function(err, files) {
  if (err) return console.error(err);
  console.log(files);
});

Release history

v1.0.0 - MAJOR BREAKING CHANGES

  • the main export is now a function
  • .listFiles was renamed to .files

About

Related projects

  • gists: Methods for working with the GitHub Gist API. Node.js/JavaScript | homepage
  • github-base: JavaScript wrapper that greatly simplifies working with GitHub's API. | homepage
  • github-contributors: Generate a markdown or JSON list of contributors for a project using the GitHub API. | homepage

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Running tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm install && npm test

Author

Jon Schlinkert

License

Copyright © 2017, Jon Schlinkert. Released under the MIT License.


This file was generated by verb-generate-readme, v0.6.0, on May 31, 2017.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].