diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000000000..266278039139e --- /dev/null +++ b/docs/README.md @@ -0,0 +1,95 @@ +# Nushell GitHub Pages Site + +This directory contains the GitHub Pages website for the Nushell project. + +## 🌐 Live Site + +Once deployed, the site will be available at: `https://wsx7524999.github.io/nushell/` + +## πŸ“ Structure + +- **`index.html`** - Homepage with features overview +- **`blog/`** - Blog section with posts about Nushell and AI integration +- **`tutorials/`** - Step-by-step tutorials from beginner to advanced +- **`chatbot/`** - Interactive AI chatbot demonstration +- **`assets/`** - CSS, JavaScript, and images +- **`_config.yml`** - Jekyll configuration for GitHub Pages + +## πŸš€ Deployment + +To enable GitHub Pages for this site: + +1. Go to repository **Settings** β†’ **Pages** +2. Set **Source** to "Deploy from a branch" +3. Select branch and folder: `main` (or your branch) β†’ `/docs` +4. Click **Save** + +GitHub will automatically build and deploy the site. + +## πŸ› οΈ Local Development + +To test the site locally: + +```bash +# Navigate to the docs directory +cd docs + +# Start a simple HTTP server +python3 -m http.server 8080 + +# Open http://localhost:8080 in your browser +``` + +## πŸ“ Content + +### Blog Posts +1. **Integrating ChatGPT with Nushell** - About AI integration benefits +2. **The Power of Structured Data** - How Nushell handles structured data +3. **Building a True Cross-Platform Shell** - Cross-platform development journey + +### Tutorials +1. **Getting Started with Nushell** (Beginner, 15 min) - Installation and basics +2. **Mastering Data Pipelines** (Intermediate, 25 min) - Advanced data manipulation +3. **Setting Up AI Integration** (Intermediate, 20 min) - ChatGPT setup guide + +### Chatbot +Interactive demo with simulated AI responses. For real ChatGPT integration, follow the setup tutorial. + +## 🎨 Customization + +### Colors +Edit `assets/css/main.css` to change the color scheme. Main colors are defined in CSS variables: + +```css +:root { + --primary-color: #667eea; + --secondary-color: #764ba2; + --accent-color: #f093fb; +} +``` + +### Navigation +Edit the navigation menu in each HTML file or update `_config.yml` for site-wide changes. + +### Content +- Blog posts: Edit HTML files in `blog/` +- Tutorials: Edit HTML files in `tutorials/` +- Chatbot responses: Edit `chatbot/chatbot.js` + +## πŸ“± Responsive Design + +The site is fully responsive with breakpoints at: +- **Mobile**: < 768px (hamburger menu) +- **Tablet**: 768px - 1024px +- **Desktop**: > 1024px + +## πŸ”§ Technologies + +- **HTML5** - Semantic markup +- **CSS3** - Modern styling with flexbox and grid +- **JavaScript (ES6)** - Interactive features +- **Jekyll** - Static site generation (via GitHub Pages) + +## πŸ“„ License + +This site content is part of the Nushell project and follows the same MIT license. diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 0000000000000..44ac8fa339a42 --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,38 @@ +# Site settings +title: Nushell - A Modern Shell with AI Integration +description: >- + A new type of shell with powerful AI capabilities. Explore our blog, tutorials, + and interactive chatbot to experience the future of command-line interfaces. +baseurl: "" # the subpath of your site, e.g. /blog +url: "https://wsx7524999.github.io/nushell" # the base hostname & protocol for your site + +# Build settings +markdown: kramdown +theme: minima + +# Navigation +navigation: + - title: Home + url: / + - title: Blog + url: /blog/ + - title: Tutorials + url: /tutorials/ + - title: Live Chatbot + url: /chatbot/ + - title: GitHub + url: https://github.com/wsx7524999/nushell + +# Social links +github_username: wsx7524999 +discord_url: https://discord.gg/NtAbbGn + +# Exclude from processing +exclude: + - Gemfile + - Gemfile.lock + - node_modules + - vendor/bundle/ + - vendor/cache/ + - vendor/gems/ + - vendor/ruby/ diff --git a/docs/assets/css/main.css b/docs/assets/css/main.css new file mode 100644 index 0000000000000..ca62afcdd0d0b --- /dev/null +++ b/docs/assets/css/main.css @@ -0,0 +1,430 @@ +/* Reset and Base Styles */ +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +:root { + --primary-color: #667eea; + --secondary-color: #764ba2; + --accent-color: #f093fb; + --text-dark: #2d3748; + --text-light: #4a5568; + --bg-light: #f7fafc; + --bg-white: #ffffff; + --border-color: #e2e8f0; + --shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15); +} + +body { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; + line-height: 1.6; + color: var(--text-dark); + background-color: var(--bg-light); +} + +/* Navigation */ +.navbar { + background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); + color: white; + padding: 1rem 0; + position: sticky; + top: 0; + z-index: 1000; + box-shadow: var(--shadow); +} + +.nav-container { + max-width: 1200px; + margin: 0 auto; + padding: 0 2rem; + display: flex; + justify-content: space-between; + align-items: center; +} + +.nav-brand h1 { + font-size: 1.5rem; + font-weight: 700; +} + +.nav-menu { + display: flex; + list-style: none; + gap: 2rem; + align-items: center; +} + +.nav-menu a { + color: white; + text-decoration: none; + font-weight: 500; + transition: opacity 0.3s; + padding: 0.5rem 1rem; + border-radius: 6px; +} + +.nav-menu a:hover, +.nav-menu a.active { + background: rgba(255, 255, 255, 0.2); +} + +.nav-toggle { + display: none; + flex-direction: column; + background: none; + border: none; + cursor: pointer; + padding: 0.5rem; +} + +.nav-toggle span { + width: 25px; + height: 3px; + background: white; + margin: 3px 0; + transition: 0.3s; + border-radius: 2px; +} + +/* Hero Section */ +.hero { + background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); + color: white; + padding: 6rem 2rem; + text-align: center; +} + +.hero-content { + max-width: 800px; + margin: 0 auto; +} + +.hero-title { + font-size: 3rem; + margin-bottom: 1rem; + font-weight: 700; +} + +.hero-subtitle { + font-size: 1.5rem; + margin-bottom: 2rem; + opacity: 0.95; +} + +.hero-buttons { + display: flex; + gap: 1rem; + justify-content: center; + flex-wrap: wrap; +} + +.btn { + padding: 0.875rem 2rem; + border-radius: 8px; + text-decoration: none; + font-weight: 600; + transition: transform 0.2s, box-shadow 0.2s; + display: inline-block; +} + +.btn-primary { + background: white; + color: var(--primary-color); +} + +.btn-secondary { + background: rgba(255, 255, 255, 0.2); + color: white; + border: 2px solid white; +} + +.btn:hover { + transform: translateY(-2px); + box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2); +} + +/* Container */ +.container { + max-width: 1200px; + margin: 0 auto; + padding: 4rem 2rem; +} + +/* Section Titles */ +.section-title { + font-size: 2.5rem; + margin-bottom: 3rem; + text-align: center; + color: var(--text-dark); +} + +/* Features Grid */ +.features { + margin-bottom: 4rem; +} + +.features-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + gap: 2rem; +} + +.feature-card { + background: var(--bg-white); + padding: 2rem; + border-radius: 12px; + box-shadow: var(--shadow); + transition: transform 0.3s, box-shadow 0.3s; + text-align: center; +} + +.feature-card:hover { + transform: translateY(-5px); + box-shadow: var(--shadow-lg); +} + +.feature-icon { + font-size: 3rem; + margin-bottom: 1rem; +} + +.feature-card h3 { + font-size: 1.5rem; + margin-bottom: 1rem; + color: var(--text-dark); +} + +.feature-card p { + color: var(--text-light); + margin-bottom: 1.5rem; +} + +.feature-link { + color: var(--primary-color); + text-decoration: none; + font-weight: 600; + transition: color 0.3s; +} + +.feature-link:hover { + color: var(--secondary-color); +} + +/* About Section */ +.about { + margin-bottom: 4rem; + background: var(--bg-white); + padding: 3rem; + border-radius: 12px; + box-shadow: var(--shadow); +} + +.about-content p { + font-size: 1.125rem; + color: var(--text-light); + margin-bottom: 1.5rem; + line-height: 1.8; +} + +/* Highlights Grid */ +.highlights { + margin-bottom: 4rem; +} + +.highlights-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 2rem; +} + +.highlight-item { + background: var(--bg-white); + padding: 1.5rem; + border-radius: 8px; + box-shadow: var(--shadow); + border-left: 4px solid var(--primary-color); +} + +.highlight-item h4 { + font-size: 1.25rem; + margin-bottom: 0.5rem; + color: var(--text-dark); +} + +.highlight-item p { + color: var(--text-light); + font-size: 0.95rem; +} + +/* Footer */ +.footer { + background: var(--text-dark); + color: white; + padding: 2rem; + text-align: center; +} + +.footer-content { + max-width: 1200px; + margin: 0 auto; +} + +.footer-links { + margin-top: 1rem; + display: flex; + gap: 2rem; + justify-content: center; + flex-wrap: wrap; +} + +.footer-links a { + color: white; + text-decoration: none; + opacity: 0.8; + transition: opacity 0.3s; +} + +.footer-links a:hover { + opacity: 1; +} + +/* Responsive Design */ +@media (max-width: 768px) { + .nav-toggle { + display: flex; + } + + .nav-menu { + position: absolute; + top: 100%; + left: 0; + right: 0; + background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); + flex-direction: column; + padding: 1rem; + gap: 0; + display: none; + } + + .nav-menu.active { + display: flex; + } + + .nav-menu li { + width: 100%; + } + + .nav-menu a { + display: block; + padding: 1rem; + } + + .hero-title { + font-size: 2rem; + } + + .hero-subtitle { + font-size: 1.125rem; + } + + .section-title { + font-size: 2rem; + } + + .features-grid, + .highlights-grid { + grid-template-columns: 1fr; + } + + .container { + padding: 2rem 1rem; + } +} + +@media (max-width: 480px) { + .hero { + padding: 4rem 1rem; + } + + .hero-title { + font-size: 1.75rem; + } + + .hero-buttons { + flex-direction: column; + } + + .btn { + width: 100%; + } +} + +/* Common Styles for All Pages */ +.page-header { + background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); + color: white; + padding: 4rem 2rem; + text-align: center; + margin-bottom: 3rem; +} + +.page-title { + font-size: 2.5rem; + margin-bottom: 1rem; +} + +.page-subtitle { + font-size: 1.25rem; + opacity: 0.95; +} + +.content-container { + max-width: 900px; + margin: 0 auto; + padding: 0 2rem 4rem; +} + +.card { + background: var(--bg-white); + padding: 2rem; + border-radius: 12px; + box-shadow: var(--shadow); + margin-bottom: 2rem; +} + +.card:hover { + box-shadow: var(--shadow-lg); + transition: box-shadow 0.3s; +} + +.card-title { + font-size: 1.75rem; + margin-bottom: 1rem; + color: var(--text-dark); +} + +.card-meta { + color: var(--text-light); + font-size: 0.875rem; + margin-bottom: 1rem; +} + +.card-content { + color: var(--text-light); + line-height: 1.8; +} + +.card-link { + display: inline-block; + margin-top: 1rem; + color: var(--primary-color); + text-decoration: none; + font-weight: 600; +} + +.card-link:hover { + color: var(--secondary-color); +} diff --git a/docs/assets/js/main.js b/docs/assets/js/main.js new file mode 100644 index 0000000000000..18223bce44ec2 --- /dev/null +++ b/docs/assets/js/main.js @@ -0,0 +1,87 @@ +// Mobile Navigation Toggle +document.addEventListener('DOMContentLoaded', function() { + const navToggle = document.querySelector('.nav-toggle'); + const navMenu = document.querySelector('.nav-menu'); + + if (navToggle) { + navToggle.addEventListener('click', function() { + navMenu.classList.toggle('active'); + + // Animate hamburger icon + const spans = navToggle.querySelectorAll('span'); + if (navMenu.classList.contains('active')) { + spans[0].style.transform = 'rotate(45deg) translate(5px, 5px)'; + spans[1].style.opacity = '0'; + spans[2].style.transform = 'rotate(-45deg) translate(7px, -6px)'; + } else { + spans[0].style.transform = 'none'; + spans[1].style.opacity = '1'; + spans[2].style.transform = 'none'; + } + }); + } + + // Close menu when clicking outside + document.addEventListener('click', function(event) { + if (navMenu && navToggle) { + const isClickInside = navMenu.contains(event.target) || navToggle.contains(event.target); + + if (!isClickInside && navMenu.classList.contains('active')) { + navMenu.classList.remove('active'); + const spans = navToggle.querySelectorAll('span'); + spans[0].style.transform = 'none'; + spans[1].style.opacity = '1'; + spans[2].style.transform = 'none'; + } + } + }); + + // Smooth scroll for anchor links + document.querySelectorAll('a[href^="#"]').forEach(anchor => { + anchor.addEventListener('click', function (e) { + e.preventDefault(); + const target = document.querySelector(this.getAttribute('href')); + if (target) { + target.scrollIntoView({ + behavior: 'smooth', + block: 'start' + }); + } + }); + }); + + // Add active class to current page in navigation + const currentPath = window.location.pathname; + document.querySelectorAll('.nav-menu a').forEach(link => { + const linkPath = new URL(link.href).pathname; + if (currentPath.includes(linkPath) && linkPath !== '/') { + link.classList.add('active'); + } + }); +}); + +// Animation on scroll +const observerOptions = { + threshold: 0.1, + rootMargin: '0px 0px -50px 0px' +}; + +const observer = new IntersectionObserver(function(entries) { + entries.forEach(entry => { + if (entry.isIntersecting) { + entry.target.style.opacity = '1'; + entry.target.style.transform = 'translateY(0)'; + } + }); +}, observerOptions); + +// Observe elements for animation +document.addEventListener('DOMContentLoaded', function() { + const animatedElements = document.querySelectorAll('.feature-card, .highlight-item, .card'); + animatedElements.forEach(el => { + el.style.opacity = '0'; + el.style.transform = 'translateY(20px)'; + el.style.transition = 'opacity 0.6s ease, transform 0.6s ease'; + observer.observe(el); + }); +}); diff --git a/docs/blog/ai-integration-chatgpt.html b/docs/blog/ai-integration-chatgpt.html new file mode 100644 index 0000000000000..92ec815fb626c --- /dev/null +++ b/docs/blog/ai-integration-chatgpt.html @@ -0,0 +1,163 @@ + + + + + + Integrating ChatGPT with Nushell - Blog - Nushell + + + + + + + + +
+ ← Back to Blog + +

+ We're excited to announce a groundbreaking integration that brings the power of ChatGPT directly + into your Nushell environment. This integration represents our vision for the future of + command-line interfaces: intelligent, intuitive, and incredibly powerful. +

+ +

Why AI in a Shell?

+

+ The command line has always been a powerful tool, but it comes with a steep learning curve. + Commands have cryptic flags, syntax varies between tools, and documentation can be overwhelming. + By integrating ChatGPT, we're making the shell accessible to everyone while enhancing productivity + for experienced users. +

+ +

Key Features

+ + +

How It Works

+

+ Our integration uses OpenAI's powerful GPT models through a secure backend API. The frontend + provides a clean, intuitive interface where you can: +

+ + +

Real-World Applications

+

+ Imagine asking: "How do I parse this JSON file and extract all email addresses?" Instead of + searching through documentation, you get an immediate, working solution tailored to your needs. + Or: "Why is my pipeline failing?" and receive specific debugging advice. +

+ +

Privacy and Security

+

+ We take your privacy seriously. The integration is designed with security in mind: +

+ + +

Get Started Today

+

+ Ready to experience the future of shell interaction? Visit our + Live Chatbot page to try it out, + or check out our tutorials + to learn how to set it up locally. +

+ +

+ This is just the beginning. We're constantly improving the integration and adding new features. + Join our community on Discord + to share feedback and ideas! +

+ + ← Back to Blog +
+ + + + + + diff --git a/docs/blog/cross-platform-journey.html b/docs/blog/cross-platform-journey.html new file mode 100644 index 0000000000000..49e86d93b2f8d --- /dev/null +++ b/docs/blog/cross-platform-journey.html @@ -0,0 +1,192 @@ + + + + + + Building a True Cross-Platform Shell Experience - Blog - Nushell + + + + + + + + +
+ ← Back to Blog + +

+ In today's heterogeneous computing environment, developers and system administrators work + across multiple platforms daily. Yet most shells are tied to specific operating systemsβ€”bash + on Linux/macOS, PowerShell on Windows. Nushell was built from the ground up to work + identically everywhere. +

+ +

The Cross-Platform Challenge

+

+ Creating a truly cross-platform shell isn't just about running on different operating systems. + It's about providing a consistent experience while respecting platform differences. File paths, + environment variables, process management, and system commands all vary between Windows, macOS, + and Linux. +

+ +

Rust: The Foundation

+

+ We chose Rust as our implementation language for several key reasons: +

+ + +

Unified Path Handling

+

+ One of the trickiest aspects of cross-platform development is path handling. Windows uses + backslashes and drive letters; Unix systems use forward slashes and a single root. Nushell + provides a unified path system that works everywhere: +

+ + +

Consistent Command Set

+

+ Traditional shells rely heavily on external commands that vary by platform. Nushell includes + a rich set of built-in commands that work identically everywhere: +

+ + +

Respecting Platform Differences

+

+ While consistency is important, we don't ignore platform-specific features. Nushell + gracefully handles differences: +

+ + +

Testing Across Platforms

+

+ Ensuring true cross-platform compatibility requires rigorous testing. Our CI/CD pipeline + runs on Windows, macOS, and Linux, catching platform-specific issues early. We also have + active community members on all platforms helping identify and fix edge cases. +

+ +

The Benefits

+

+ This cross-platform approach delivers real benefits: +

+ + +

Community-Driven Development

+

+ Our cross-platform success wouldn't be possible without our diverse community. Contributors + from around the world, using different operating systems, help ensure Nushell works well + everywhere. If you encounter platform-specific issues, we want to hear about them! +

+ +

The Future

+

+ We're continuously improving cross-platform support. Upcoming features include better + integration with platform-specific tools, enhanced terminal capabilities across different + terminal emulators, and more seamless handling of platform differences. +

+ +

Get Started Today

+

+ Ready to experience true cross-platform shell consistency? Download Nushell for your + platform and see the difference. Check our + tutorials for + installation instructions and getting started guides. +

+ + ← Back to Blog +
+ + + + + + diff --git a/docs/blog/index.html b/docs/blog/index.html new file mode 100644 index 0000000000000..a78259e2b9efa --- /dev/null +++ b/docs/blog/index.html @@ -0,0 +1,113 @@ + + + + + + Blog - Nushell + + + + + + + +
+
+

+ + Integrating ChatGPT with Nushell: A Game Changer + +

+
+ πŸ“… November 5, 2024 | + πŸ‘€ Nushell Team | + 🏷️ AI, Integration, ChatGPT +
+
+

+ Discover how we've integrated ChatGPT into Nushell to provide intelligent command assistance, + code generation, and interactive help. This integration represents a significant step forward + in making shell interactions more intuitive and powerful. +

+
+ Read More β†’ +
+ +
+

+ + The Power of Structured Data in Modern Shells + +

+
+ πŸ“… November 1, 2024 | + πŸ‘€ Nushell Team | + 🏷️ Data, Features, Pipeline +
+
+

+ Traditional shells treat everything as text, but Nushell takes a different approach. + Learn how structured data pipelines transform the way you work with JSON, CSV, TOML, + and other data formats directly from the command line. +

+
+ Read More β†’ +
+ +
+

+ + Building a True Cross-Platform Shell Experience + +

+
+ πŸ“… October 28, 2024 | + πŸ‘€ Nushell Team | + 🏷️ Cross-Platform, Development, Community +
+
+

+ One shell to rule them all! Explore the journey of making Nushell work seamlessly across + Windows, macOS, and Linux. Learn about the challenges we faced and how we achieved + true cross-platform compatibility without compromises. +

+
+ Read More β†’ +
+
+ + + + + + diff --git a/docs/blog/structured-data-power.html b/docs/blog/structured-data-power.html new file mode 100644 index 0000000000000..0ca417c231d1e --- /dev/null +++ b/docs/blog/structured-data-power.html @@ -0,0 +1,186 @@ + + + + + + The Power of Structured Data in Modern Shells - Blog - Nushell + + + + + + + + +
+ ← Back to Blog + +

+ For decades, Unix shells have treated everything as text streams. While this simplicity was + revolutionary in its time, modern workflows demand more. Nushell reimagines the shell with + structured data at its core, transforming how we interact with information. +

+ +

The Text-Only Problem

+

+ Traditional shells pass text between commands. Want to extract the third column from a CSV? + You'll need tools like awk, cut, or sed, each with + their own syntax quirks. Processing JSON requires external tools like jq. + The result? Complex pipelines that are hard to read, write, and maintain. +

+ +

Nushell's Structured Approach

+

+ Nushell treats data as structured from the start. Files aren't just textβ€”they're tables, + records, or lists with known types. This fundamental shift makes data manipulation intuitive: +

+ +
# Open a JSON file
+open data.json
+
+# Filter and select columns
+open data.json | where status == "active" | select name email
+
+# Convert between formats
+open data.csv | to json | save output.json
+ +

Built-in Format Support

+

+ Nushell natively understands numerous data formats: +

+ + +

Type Safety Benefits

+

+ With structured data comes type safety. Nushell knows the difference between a number, + a string, and a date. This prevents common errors and enables intelligent operations: +

+ +
# Math operations work naturally
+ls | where size > 1mb | get name
+
+# Date comparisons are intuitive
+ps | where start_time < (date now) - 1hr
+ +

Pipeline Visualization

+

+ Because data is structured, Nushell can visualize it beautifully. Tables are formatted + automatically, and you can explore nested structures interactively. No more piping to + less or counting columns manually. +

+ +

Real-World Impact

+

+ This structured approach isn't just theoreticalβ€”it transforms daily workflows: +

+ + +

Learning Curve?

+

+ You might think this power comes with complexity, but the opposite is true. Nushell's + structured data makes commands more predictable and easier to learn. Once you understand + basic operations like where, select, and each, + you can apply them consistently across all data types. +

+ +

Try It Yourself

+

+ Ready to experience structured data in action? Check out our + tutorials section for + hands-on examples, or try Nushell today and see the difference yourself. +

+ + ← Back to Blog +
+ + + + + + diff --git a/docs/chatbot/chatbot.js b/docs/chatbot/chatbot.js new file mode 100644 index 0000000000000..c036ae4b24ed7 --- /dev/null +++ b/docs/chatbot/chatbot.js @@ -0,0 +1,342 @@ +// Simulated AI responses for demo purposes +const simulatedResponses = { + 'filter files larger than 1mb': { + response: `To filter files larger than 1MB in Nushell, you can use the \`where\` command with a size comparison: + +\`\`\` +ls | where size > 1mb +\`\`\` + +This command: +1. Lists all files in the current directory with \`ls\` +2. Filters the results using \`where\` to show only files where \`size > 1mb\` + +You can also combine this with other filters: + +\`\`\` +# Show only files (not directories) larger than 1MB +ls | where type == "file" and size > 1mb + +# Sort by size and show top 10 +ls | where size > 1mb | sort-by size --reverse | first 10 +\`\`\` + +The size comparison supports units like \`kb\`, \`mb\`, \`gb\`, etc.` + }, + 'where and select': { + response: `Great question! \`where\` and \`select\` serve different purposes in Nushell: + +**where** - Filters rows (records) +- Keeps rows that match a condition +- Works like a SQL WHERE clause +- Example: \`ls | where size > 1mb\` (keeps only large files) + +**select** - Selects columns (fields) +- Chooses which columns to display +- Works like a SQL SELECT clause +- Example: \`ls | select name size\` (shows only name and size columns) + +**Common Usage Pattern:** +\`\`\` +ls | where size > 1mb | select name size modified +\`\`\` + +This filters to large files (where), then shows only specific columns (select). + +**Key Difference:** +- \`where\` reduces the number of rows +- \`select\` reduces the number of columns + +Think of \`where\` as asking "which items?" and \`select\` as asking "which information about those items?"` + }, + 'json to csv': { + response: `Converting JSON to CSV in Nushell is straightforward using the \`to csv\` command: + +\`\`\` +# Basic conversion +open data.json | to csv | save output.csv + +# With custom delimiter (e.g., tab-separated) +open data.json | to csv --separator "\\t" | save output.tsv + +# Without headers +open data.json | to csv --noheaders | save output.csv +\`\`\` + +**Example with real data:** +\`\`\` +# Convert user data +open users.json | to csv | save users.csv + +# Select specific fields before converting +open users.json | select name email age | to csv | save contacts.csv +\`\`\` + +**For nested JSON:** +If your JSON has nested objects, you might need to flatten it first: +\`\`\` +open data.json | flatten | to csv | save output.csv +\`\`\` + +The conversion preserves the structure and automatically handles the CSV formatting for you!` + }, + 'group data by column': { + response: `To group data by a column in Nushell, use the \`group-by\` command: + +\`\`\` +# Basic grouping by a single column +open data.csv | group-by category + +# Group and count items in each group +open data.csv | group-by status | each { |key, values| + { + status: $key, + count: ($values | length) + } +} + +# Group and calculate sum +open sales.csv | group-by region | each { |key, values| + { + region: $key, + total_sales: ($values | get amount | math sum), + avg_sales: ($values | get amount | math avg) + } +} +\`\`\` + +**Real Example - Sales by Region:** +\`\`\` +open sales.csv + | group-by region + | each { |key, values| + { + region: $key, + total: ($values | get amount | math sum), + count: ($values | length), + average: ($values | get amount | math avg) + } + } + | sort-by total --reverse +\`\`\` + +This groups sales data by region and calculates totals, counts, and averages for each region.` + }, + 'parse analyze log files': { + response: `Here's how to parse and analyze log files with Nushell: + +**1. Read and Filter Logs:** +\`\`\` +# Read log file and filter by keyword +open app.log | lines | where $it =~ "ERROR" + +# Count errors by hour +open app.log | lines | where $it =~ "ERROR" | length +\`\`\` + +**2. Parse Structured Logs:** +\`\`\` +# Parse common log format +open access.log + | lines + | parse "{ip} - - [{timestamp}] \"{method} {path} {protocol}\" {status} {size}" + | where status >= 400 + +# For JSON logs +open app.json | lines | each { |line| $line | from json } | where level == "error" +\`\`\` + +**3. Aggregate Statistics:** +\`\`\` +# Count status codes +open access.log + | lines + | parse "{ip} - - [{timestamp}] \"{method} {path} {protocol}\" {status} {size}" + | group-by status + | each { |key, values| { status: $key, count: ($values | length) } } + | sort-by count --reverse + +# Find most accessed paths +open access.log + | lines + | parse "{ip} - - [{timestamp}] \"{method} {path} {protocol}\" {status} {size}" + | group-by path + | each { |key, values| { path: $key, hits: ($values | length) } } + | sort-by hits --reverse + | first 10 +\`\`\` + +**4. Time-based Analysis:** +\`\`\` +# Errors in the last hour +open app.log + | lines + | where $it =~ "ERROR" + | where modified > ((date now) - 1hr) +\`\`\` + +Nushell makes log analysis powerful and intuitive!` + }, + 'default': { + response: `I'm a simulated chatbot demonstrating Nushell AI capabilities. Here are some things I can help with: + +**Common Topics:** +- Basic Nushell commands and syntax +- Data filtering and transformation +- Working with structured data (JSON, CSV, TOML) +- Pipeline operations +- File and directory operations +- Data aggregation and analysis + +**For Real AI Assistance:** +Follow our [AI Integration Setup Tutorial](../tutorials/ai-integration-setup.html) to connect to ChatGPT for comprehensive, personalized help. + +**Try asking:** +- "How do I filter files larger than 1MB?" +- "What's the difference between where and select?" +- "How can I convert JSON to CSV?" + +What would you like to know about Nushell?` + } +}; + +// DOM elements +const messagesContainer = document.getElementById('messages'); +const userInput = document.getElementById('user-input'); +const sendBtn = document.getElementById('send-btn'); +const modelSelect = document.getElementById('model-select'); +const questionBtns = document.querySelectorAll('.question-btn'); + +// Initialize +let messageCount = 0; + +// Add event listeners +sendBtn.addEventListener('click', sendMessage); +userInput.addEventListener('keypress', (e) => { + if (e.key === 'Enter') { + sendMessage(); + } +}); + +questionBtns.forEach(btn => { + btn.addEventListener('click', () => { + userInput.value = btn.textContent; + sendMessage(); + }); +}); + +function sendMessage() { + const message = userInput.value.trim(); + if (!message) return; + + // Clear empty state on first message + if (messageCount === 0) { + messagesContainer.innerHTML = ''; + } + + // Add user message + addMessage(message, 'user'); + userInput.value = ''; + userInput.disabled = true; + sendBtn.disabled = true; + + // Show typing indicator + const typingIndicator = addTypingIndicator(); + + // Simulate AI response delay + setTimeout(() => { + removeTypingIndicator(typingIndicator); + const response = getSimulatedResponse(message); + addMessage(response, 'assistant'); + userInput.disabled = false; + sendBtn.disabled = false; + userInput.focus(); + }, 1500 + Math.random() * 1000); + + messageCount++; +} + +function addMessage(text, type) { + const messageDiv = document.createElement('div'); + messageDiv.className = `message ${type}-message`; + + if (type === 'assistant') { + // Parse markdown-style code blocks + text = text.replace(/```(\w*)\n?([\s\S]*?)```/g, (match, lang, code) => { + return `
${escapeHtml(code.trim())}
`; + }); + // Parse inline code + text = text.replace(/`([^`]+)`/g, '$1'); + // Parse bold + text = text.replace(/\*\*([^*]+)\*\*/g, '$1'); + // Preserve line breaks + text = text.replace(/\n/g, '
'); + + messageDiv.innerHTML = text; + } else { + messageDiv.textContent = text; + } + + messagesContainer.appendChild(messageDiv); + messagesContainer.scrollTop = messagesContainer.scrollHeight; + + return messageDiv; +} + +function addTypingIndicator() { + const indicator = document.createElement('div'); + indicator.className = 'typing-indicator active'; + indicator.innerHTML = ''; + messagesContainer.appendChild(indicator); + messagesContainer.scrollTop = messagesContainer.scrollHeight; + return indicator; +} + +function removeTypingIndicator(indicator) { + if (indicator && indicator.parentNode) { + indicator.parentNode.removeChild(indicator); + } +} + +function getSimulatedResponse(question) { + const lowerQuestion = question.toLowerCase(); + + // Match keywords to responses + for (const [key, data] of Object.entries(simulatedResponses)) { + if (key !== 'default' && lowerQuestion.includes(key)) { + return data.response; + } + } + + // Default response + return simulatedResponses.default.response; +} + +function escapeHtml(text) { + const div = document.createElement('div'); + div.textContent = text; + return div.innerHTML; +} + +// Show welcome message after a short delay +setTimeout(() => { + if (messageCount === 0) { + messagesContainer.innerHTML = ''; + addMessage( + `Hello! I'm your Nushell AI Assistant. πŸ‘‹ + +I can help you with: +- Understanding Nushell commands +- Writing pipelines and filters +- Working with structured data +- Converting between file formats +- And much more! + +**Note:** This is a demo with simulated responses. For real ChatGPT assistance, check out our [setup tutorial](../tutorials/ai-integration-setup.html). + +Try clicking a suggested question below or ask me anything about Nushell!`, + 'assistant' + ); + messageCount++; + } +}, 500); diff --git a/docs/chatbot/index.html b/docs/chatbot/index.html new file mode 100644 index 0000000000000..14b4c39b9e715 --- /dev/null +++ b/docs/chatbot/index.html @@ -0,0 +1,392 @@ + + + + + + Live AI Chatbot - Nushell + + + + + + + + +
+
+ ℹ️ Demo Mode: This is a simulated chatbot demonstrating the AI integration concept. + For the full experience with real ChatGPT responses, follow the + setup tutorial. +
+ +
+
+

πŸ€– Nushell AI Assistant

+

Ask questions about Nushell commands, features, and best practices

+
+ +
+
+ + +
+ +
+
+ + + +

Start a conversation! Ask me anything about Nushell.

+
+
+ +
+ + +
+
+
+ +
+

πŸ’‘ Suggested Questions

+ + + + + +
+
+ + + + + + + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000000000..2a509529e891a --- /dev/null +++ b/docs/index.html @@ -0,0 +1,125 @@ + + + + + + Nushell - A Modern Shell with AI Integration + + + + + +
+
+

Welcome to Nushell

+

A new type of shell with powerful AI integration

+ +
+
+ +
+
+

Features

+
+
+
πŸ“
+

Blog

+

Stay updated with the latest developments, insights, and AI integration stories from the Nushell community.

+ Read the Blog β†’ +
+
+
πŸ“š
+

Tutorials

+

Learn Nushell from basics to advanced features with our comprehensive, hands-on tutorials.

+ Explore Tutorials β†’ +
+
+
πŸ€–
+

AI Chatbot

+

Experience the power of AI integration with our live ChatGPT-powered assistant for Nushell.

+ Try the Chatbot β†’ +
+
+
+ +
+

About Nushell

+
+

+ Nushell is a modern shell that brings together the Unix philosophy of shells, modern CLI tools, + and structured data. It's designed to work with any data source and provides powerful features + for data manipulation and automation. +

+

+ With integrated AI capabilities powered by ChatGPT, Nushell offers an enhanced command-line + experience that combines traditional shell power with intelligent assistance. +

+
+
+ +
+

Why Choose Nushell?

+
+
+

🎯 Structured Data

+

Work with structured data naturally using tables, lists, and pipelines

+
+
+

πŸ”§ Modern Tools

+

Built-in commands for JSON, CSV, TOML, and more

+
+
+

πŸš€ Cross-Platform

+

Works seamlessly on Windows, macOS, and Linux

+
+
+

πŸ€– AI-Powered

+

Integrated ChatGPT for intelligent command assistance

+
+
+

πŸ“Š Data Visualization

+

Transform and visualize data directly in the shell

+
+
+

πŸ”’ Type Safety

+

Strong typing helps catch errors early

+
+
+
+
+ + + + + + diff --git a/docs/tutorials/ai-integration-setup.html b/docs/tutorials/ai-integration-setup.html new file mode 100644 index 0000000000000..69e8bec038961 --- /dev/null +++ b/docs/tutorials/ai-integration-setup.html @@ -0,0 +1,351 @@ + + + + + + Setting Up AI Integration - Tutorials - Nushell + + + + + + + + +
+ ← Back to Tutorials + +

+ Learn how to set up and use the ChatGPT integration in Nushell. This powerful feature brings + AI-powered assistance directly to your command line, helping you write commands, debug issues, + and learn Nushell more efficiently. +

+ +

1. Prerequisites

+

+ Before starting, make sure you have: +

+ + +

2. Getting Your OpenAI API Key

+
    +
  1. Visit OpenAI's API Keys page
  2. +
  3. Sign in or create an account
  4. +
  5. Click "Create new secret key"
  6. +
  7. Give it a name (e.g., "Nushell Integration")
  8. +
  9. Copy the key immediatelyβ€”you won't be able to see it again!
  10. +
+ +
+ ⚠️ Security Warning: Never share your API key or commit it to version control. + Treat it like a passwordβ€”anyone with your key can use your OpenAI account. +
+ +

3. Installing the Backend

+ +

Navigate to the Integration Directory

+
cd chatgpt-integration/backend
+ +

Install Python Dependencies

+
pip install -r requirements.txt
+ +

+ This installs Flask (the web framework) and the OpenAI Python library. +

+ +

4. Configuring the Environment

+ +

Create Environment File

+
cd ..
+cp .env.example .env
+ +

Edit the .env File

+

+ Open the .env file in your favorite text editor and add your API key: +

+
OPENAI_API_KEY=sk-your-actual-api-key-here
+PORT=5000
+DEBUG=false
+ +
+ πŸ’‘ Tip: The .env file is already in .gitignore, so it won't be accidentally + committed to version control. +
+ +

5. Starting the Backend Server

+
cd backend
+python server.py
+ +

+ You should see output indicating the server is running: +

+
 * Running on http://127.0.0.1:5000
+ * Press CTRL+C to quit
+ +

6. Accessing the Frontend

+ +

Option 1: Direct File Access

+

+ Open frontend/index.html directly in your web browser by double-clicking the file. +

+ +

Option 2: Local Web Server (Recommended)

+

+ In a new terminal window: +

+
cd chatgpt-integration/frontend
+python -m http.server 8000
+ +

+ Then open your browser to http://localhost:8000 +

+ +

7. Using the Chatbot

+ +

Basic Usage

+
    +
  1. Select your preferred model (GPT-4, GPT-4 Turbo, or GPT-3.5)
  2. +
  3. Type your question in the input field
  4. +
  5. Press Enter or click "Send"
  6. +
  7. Wait for the AI response
  8. +
+ +

Example Questions

+
How do I list all files larger than 1GB in Nushell?
+
+What's the difference between 'where' and 'filter' in Nushell?
+
+Write a Nushell command to parse JSON and extract email addresses.
+
+How can I convert a CSV file to JSON in Nushell?
+ +

8. Choosing the Right Model

+ + +
+ πŸ’‘ Tip: Start with GPT-3.5 Turbo for quick questions. Upgrade to GPT-4 + for complex scenarios or when you need the highest accuracy. +
+ +

9. Cost Management

+ +

Understanding Costs

+

+ OpenAI charges based on tokens (roughly 4 characters = 1 token): +

+ + +

Cost-Saving Tips

+ + +

10. Troubleshooting

+ +

Backend Won't Start

+ + +

"Backend Not Running" Error

+ + +

API Key Errors

+ + +

Rate Limit Errors

+ + +

11. Advanced Usage

+ +

Custom Prompts

+

+ Be specific to get better results: +

+
❌ "How do I sort files?"
+βœ… "Show me a Nushell command to sort files by size in descending order 
+   and display only the name and size columns."
+ +

Debugging Help

+

+ Include error messages for better assistance: +

+
I ran this command: `ls | where size > 1gb`
+But I got this error: "Cannot compare int and filesize"
+How do I fix this?
+ +

12. Privacy and Security

+ + +

13. Alternative: Web-Based Chatbot

+

+ Don't want to set up locally? Try our + Live Chatbot demo for a + simulated experience (no API key required). +

+ +

14. Next Steps

+ + + ← Back to Tutorials +
+ + + + + + diff --git a/docs/tutorials/data-pipelines.html b/docs/tutorials/data-pipelines.html new file mode 100644 index 0000000000000..bf06896d5ba2f --- /dev/null +++ b/docs/tutorials/data-pipelines.html @@ -0,0 +1,362 @@ + + + + + + Mastering Data Pipelines - Tutorials - Nushell + + + + + + + + +
+ ← Back to Tutorials + +

+ Pipelines are the heart of Nushell. In this tutorial, you'll learn how to chain commands + together to filter, transform, and analyze data efficiently. These skills will make you + significantly more productive with Nushell. +

+ +

1. Understanding Pipelines

+

+ In Nushell, data flows through pipelines using the | operator. Unlike traditional + shells that pass text, Nushell passes structured dataβ€”tables, records, and listsβ€”through the pipeline. +

+
# Simple pipeline: list files and filter
+ls | where size > 1mb
+ +

2. The where Command

+

+ The where command filters data based on conditions: +

+ +

Basic Filtering

+
# Filter by exact match
+ls | where type == "file"
+
+# Filter by comparison
+ls | where size > 1mb
+
+# Filter by string pattern
+ls | where name =~ ".txt"
+ +

Complex Conditions

+
# Multiple conditions with 'and'
+ls | where type == "file" and size > 1mb
+
+# Multiple conditions with 'or'
+ls | where name =~ ".txt" or name =~ ".md"
+
+# Negation with 'not'
+ls | where not (type == "dir")
+ +

3. The select Command

+

+ Use select to choose which columns to display: +

+
# Select single column
+ls | select name
+
+# Select multiple columns
+ls | select name size modified
+
+# Rename columns while selecting
+ls | select name file_size:size
+ +

4. Transforming Data with each

+

+ The each command applies an operation to each item in the pipeline: +

+
# Convert all file names to uppercase
+ls | select name | each { |it| $it.name | str upcase }
+
+# Add .backup extension to all files
+ls | select name | each { |it| $it.name + ".backup" }
+
+# Calculate size in MB for each file
+ls | each { |it| $it.size / 1mb }
+ +

5. Working with JSON Data

+ +

Reading JSON

+
# Open and parse JSON file
+open data.json
+
+# Example: users.json with array of users
+open users.json | where age > 25 | select name email
+ +

Transforming JSON

+
# Extract nested data
+open config.json | get database.host
+
+# Filter array within JSON
+open api-response.json | get results | where status == "active"
+ +

Creating JSON

+
# Convert table to JSON
+ls | select name size | to json
+
+# Save as JSON file
+ls | select name size | to json | save output.json
+ +

6. Working with CSV Data

+ +

Reading CSV

+
# Open CSV file (automatically parsed as table)
+open sales.csv
+
+# Filter and analyze
+open sales.csv | where amount > 1000 | get total | math sum
+ +

Converting Formats

+
# CSV to JSON
+open data.csv | to json | save data.json
+
+# JSON to CSV
+open data.json | to csv | save data.csv
+ +

7. Aggregation and Math

+ +

Basic Math Operations

+
# Sum of all file sizes
+ls | get size | math sum
+
+# Average file size
+ls | get size | math avg
+
+# Find maximum
+ls | get size | math max
+
+# Find minimum
+ls | get size | math min
+ +

Grouping Data

+
# Group files by type
+ls | group-by type
+
+# Count items in each group
+ls | group-by type | each { |key, values| { type: $key, count: ($values | length) } }
+ +

8. The reduce Command

+

+ reduce combines all values in a list into a single value: +

+
# Sum numbers manually
+[1 2 3 4 5] | reduce { |it, acc| $it + $acc }
+
+# Concatenate strings
+["Hello" "," " " "World"] | reduce { |it, acc| $it + $acc }
+
+# Find maximum custom logic
+ls | get size | reduce { |it, acc| if $it > $acc { $it } else { $acc } }
+ +

9. Sorting and Ordering

+ +

Simple Sorting

+
# Sort by name
+ls | sort-by name
+
+# Sort by size (descending)
+ls | sort-by size --reverse
+
+# Sort by multiple columns
+ls | sort-by type size
+ +

Custom Sorting

+
# Sort with custom logic
+ls | sort-by { |a, b| $a.size < $b.size }
+ +

10. Limiting Results

+
# Get first 5 items
+ls | first 5
+
+# Get last 3 items
+ls | last 3
+
+# Skip first 10 items
+ls | skip 10
+
+# Take items from middle
+ls | skip 5 | first 5
+ +

11. Real-World Examples

+ +

Example 1: Find Large Files

+
# Find files larger than 10MB, sort by size, show top 10
+ls **/* 
+  | where type == "file" and size > 10mb 
+  | sort-by size --reverse 
+  | first 10 
+  | select name size
+ +

Example 2: Analyze Log Files

+
# Parse and analyze JSON logs
+open app.log 
+  | lines 
+  | where $it =~ "ERROR" 
+  | parse "{timestamp} {level} {message}"
+  | where level == "ERROR"
+  | length
+ +

Example 3: Process CSV Sales Data

+
# Calculate total sales by region
+open sales.csv 
+  | group-by region 
+  | each { |key, values| 
+      { 
+        region: $key, 
+        total: ($values | get amount | math sum),
+        count: ($values | length)
+      } 
+    }
+  | sort-by total --reverse
+ +

Example 4: Clean and Transform Data

+
# Extract email domains from user data
+open users.json 
+  | select email 
+  | each { |it| $it.email | split row "@" | last }
+  | uniq 
+  | sort
+ +

12. Pipeline Best Practices

+ + +
+ πŸ’‘ Pro Tip: Press Ctrl+C to interrupt a long-running pipeline. Use + first to test pipelines on small datasets before running on all data. +
+ +

13. Next Steps

+

+ Now that you've mastered pipelines, explore these topics: +

+ + + ← Back to Tutorials +
+ + + + + + diff --git a/docs/tutorials/getting-started.html b/docs/tutorials/getting-started.html new file mode 100644 index 0000000000000..48004c4d47787 --- /dev/null +++ b/docs/tutorials/getting-started.html @@ -0,0 +1,349 @@ + + + + + + Getting Started with Nushell - Tutorials - Nushell + + + + + + + + +
+ ← Back to Tutorials + +

+ Welcome to Nushell! This tutorial will guide you through your first steps with this modern, + structured-data shell. By the end, you'll understand the basics and be ready to explore more + advanced features. +

+ +

1. Installation

+ +

On macOS and Linux

+
# Using Homebrew
+brew install nushell
+
+# Or download from GitHub releases
+# https://github.com/nushell/nushell/releases
+ +

On Windows

+
# Using winget
+winget install nushell
+
+# Or using Chocolatey
+choco install nushell
+ +

Verify Installation

+
# Check the version
+nu --version
+ +

2. Starting Nushell

+

+ Simply type nu in your terminal to start Nushell: +

+
nu
+ +

+ You'll see a welcome message and a prompt. Congratulationsβ€”you're now in Nushell! +

+ +

3. Basic Navigation

+ +

Listing Files

+

+ The ls command shows directory contents, but unlike traditional shells, + it returns a structured table: +

+
ls
+ +

+ Notice how the output is formatted as a table with columns like name, type, size, and modified date. + This is structured data! +

+ +

Changing Directories

+
cd Documents
+cd ..
+cd ~
+ +

Current Directory

+
pwd
+ +

4. Working with Structured Data

+ +

Filtering Results

+

+ Here's where Nushell shines. You can filter the ls output like database queries: +

+
# Show only directories
+ls | where type == dir
+
+# Show files larger than 1MB
+ls | where size > 1mb
+
+# Show files modified in the last week
+ls | where modified > ((date now) - 7day)
+ +

Selecting Columns

+
# Show only names
+ls | select name
+
+# Show name and size
+ls | select name size
+ +

Sorting

+
# Sort by size
+ls | sort-by size
+
+# Sort by size in reverse order
+ls | sort-by size --reverse
+ +

5. File Operations

+ +

Creating Files and Directories

+
# Create a directory
+mkdir my-project
+
+# Create a file
+touch hello.txt
+
+# Create a file with content
+"Hello, Nushell!" | save greeting.txt
+ +

Copying and Moving

+
# Copy a file
+cp source.txt destination.txt
+
+# Move a file
+mv oldname.txt newname.txt
+
+# Copy a directory
+cp -r source-dir dest-dir
+ +

Removing Files

+
# Remove a file
+rm unwanted.txt
+
+# Remove a directory
+rm -r old-directory
+ +
+ πŸ’‘ Tip: Nushell will ask for confirmation before deleting files by default, + making it safer than traditional shells. +
+ +

6. Reading File Contents

+ +

Plain Text Files

+
# View file contents
+open file.txt
+
+# View with pagination
+open large-file.txt | less
+ +

Structured Files

+

+ Nushell automatically parses common file formats: +

+
# Open JSON file (automatically parsed)
+open data.json
+
+# Open CSV file (automatically parsed as table)
+open data.csv
+
+# Open TOML configuration
+open config.toml
+ +

7. Your First Pipeline

+

+ Let's combine what we've learned into a powerful pipeline: +

+
# Find the 5 largest files in the current directory
+ls | where type == file | sort-by size --reverse | first 5 | select name size
+ +

+ This command: +

+
    +
  1. Lists all items with ls
  2. +
  3. Filters to only files with where type == file
  4. +
  5. Sorts by size (largest first) with sort-by size --reverse
  6. +
  7. Takes the first 5 items with first 5
  8. +
  9. Shows only name and size columns with select name size
  10. +
+ +

8. Getting Help

+

+ Nushell has excellent built-in documentation: +

+
# Get help for any command
+help ls
+help where
+help open
+
+# List all commands
+help commands
+
+# Search for commands
+help commands | where name =~ "date"
+ +

9. Useful Built-in Commands

+ +

System Information

+
# View system information
+sys
+
+# Check CPU info
+sys cpu
+
+# Check memory usage
+sys mem
+ +

Process Management

+
# List running processes
+ps
+
+# Find specific processes
+ps | where name =~ "chrome"
+ +

Date and Time

+
# Current date and time
+date now
+
+# Format dates
+date now | format date "%Y-%m-%d"
+ +

10. Next Steps

+

+ Congratulations! You've learned the basics of Nushell. Here's what to explore next: +

+ + +
+ πŸ’‘ Pro Tip: Use the Tab key for autocompletion of commands, file names, and more. + It's one of Nushell's most helpful features! +
+ + ← Back to Tutorials +
+ + + + + + diff --git a/docs/tutorials/index.html b/docs/tutorials/index.html new file mode 100644 index 0000000000000..01bcc9f8acbf3 --- /dev/null +++ b/docs/tutorials/index.html @@ -0,0 +1,135 @@ + + + + + + Tutorials - Nushell + + + + + + + +
+
+
+ 🌱 +
+

+ + Getting Started with Nushell + +

+
+ ⏱️ 15 minutes | + 🎯 Beginner +
+
+
+
+

+ Your first steps with Nushell! Learn how to install Nushell, understand basic concepts, + and run your first commands. This tutorial covers navigation, file operations, and + the fundamentals of working with structured data. +

+
+ Start Tutorial β†’ +
+ +
+
+ πŸ”„ +
+

+ + Mastering Data Pipelines + +

+
+ ⏱️ 25 minutes | + 🎯 Intermediate +
+
+
+
+

+ Unlock the power of Nushell's pipeline system. Learn how to filter, transform, and + manipulate structured data. Work with JSON, CSV, and other formats. Master commands + like where, select, each, and reduce. +

+
+ Start Tutorial β†’ +
+ +
+
+ πŸ€– +
+

+ + Setting Up AI Integration + +

+
+ ⏱️ 20 minutes | + 🎯 Intermediate +
+
+
+
+

+ Configure and use the ChatGPT integration in Nushell. Learn how to set up your API key, + use the chatbot for command assistance, generate scripts with AI, and leverage + intelligent features to boost your productivity. +

+
+ Start Tutorial β†’ +
+ +
+

Need Help?

+

+ Try our live AI chatbot for personalized assistance with Nushell +

+ + Talk to AI Assistant β†’ + +
+
+ + + + + +