npm package: @glitterprotocol/pinme
Description: Pinme
Author: Ted
Latest version: 1.0.8
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Pinme CLI

A simple and easy-to-use command-line tool for uploading files and directories to the IPFS network.

![Pinme CLI](https://via.placeholder.com/800x200?text=Pinme+CLI)

## Features

- 🚀 Quickly upload files and directories to IPFS
- 📂 Support for various file types and sizes
- 📊 View and manage upload history
- 🔗 Automatically generate accessible IPFS links
- 🌐 Preview uploaded content

## Installation

### Using npm

```bash
npm install -g @glitterprotocol/pinme
```

### Using yarn

```bash
yarn global add @glitterprotocol/pinme
```

## Usage

### Upload files or directories

```bash
# Interactive upload
pinme upload

# Specify path directly
pinme upload /path/to/file-or-directory
```

### View upload history

```bash
# Show the last 10 upload records
pinme list

# Or use the shorthand command
pinme ls

# Limit the number of records shown
pinme list -l 5

# Clear all upload history
pinme list -c
```

### Get help

```bash
# Display help information
pinme help

# Display help for a specific command
pinme help upload
```

## Command Details

### `upload`

Upload a file or directory to the IPFS network.

```bash
pinme upload [path]
```

**Options:**
- `path`: Path to the file or directory to upload (optional, if not provided, interactive mode will be entered)

**Examples:**
```bash
# Interactive upload
pinme upload

# Upload a specific file
pinme upload ./example.jpg

# Upload an entire directory
pinme upload ./my-website
```

### `list` / `ls`

Display upload history.

```bash
pinme list [options]
pinme ls [options]
```

**Options:**
- `-l, --limit <number>`: Limit the number of records displayed
- `-c, --clear`: Clear all upload history

**Examples:**
```bash
# Show the last 10 records
pinme list

# Show the last 5 records
pinme ls -l 5

# Clear all history records
pinme list -c
```

### `help`

Display help information.

```bash
pinme help [command]
```

**Options:**
- `command`: The specific command to view help for (optional)

**Examples:**
```bash
# Display general help
pinme help

# Display help for the upload command
pinme help upload
```

## Upload Limits

- Single file size limit: 100MB
- Total directory size limit: 500MB

## File Storage

Uploaded files are stored on the IPFS network and accessible through the Glitter Protocol's IPFS gateway. After a successful upload, you will receive:

1. IPFS hash value
2. Accessible URL link

## Data Privacy

- Upload history is stored locally (`~/.pinme/upload-history.json`)
- Device ID is stored locally (`~/.pinme/device-id.json`)
- All content uploaded to IPFS is public, do not upload sensitive information

## Troubleshooting

### Common Issues

1. **Upload Failure**
   - Check network connection
   - Confirm the file/directory exists and has read permissions
   - Confirm the file size does not exceed limits

2. **Command Not Found**
   - Confirm global installation was successful
   - Check PATH environment variable
   - Try reinstalling

3. **History Not Displaying**
   - Check if the `~/.pinme` directory exists
   - Confirm read/write permissions

### Log Locations

Logs and configuration files are stored in:
- Linux/macOS: `~/.pinme/`
- Windows: `%USERPROFILE%\.pinme\`

## Contribution Guidelines

Contributions of code, issue reports, or improvement suggestions are welcome! Please follow these steps:

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Create a Pull Request

## License

MIT License - See the [LICENSE](LICENSE) file for details

## Contact Us

If you have questions or suggestions, please contact us through:

- GitHub Issues: [https://github.com/glitterprotocol/pinme-cli/issues](https://github.com/glitterprotocol/pinme-cli/issues)
- Email: [support@example.com](mailto:support@example.com)

---

Developed and maintained by the [Glitter Protocol](https://github.com/glitterprotocol) team